run -ti
If you start docker with
docker run -ti --name NAME DOCKER_IMAGEWhen you exit the terminal, the docker instance is terminated.
You can connect a second tty via
docker exec -ti NAME bashrun -td
You can start a docker instance detached (run in background)
docker run -td --name NAME DOCKER_IMAGEThen you can connnect one or more tty
docker exec -ti NAME bashCommands
To stop the instance
docker stop NAMETo start the instance again
docker start NAMETo check running docker instance
docker psNOTE: To list docker instances which stopped docker ps -a
To remove the instance name (so you can reuse the name for different config)
docker rm NAME