Showing posts with label docker multiple terminals same container. Show all posts
Showing posts with label docker multiple terminals same container. Show all posts

Monday, August 6, 2018

docker open another terminal of running container

If you are running any python node or similar server in docker container which does not return on command prompt and you want to run another command in same container, either you need to stop running server, that may not be your requirement or you attach same container again but it takes you in same running server so you can not run commands.

You can open another instance of terminal of same container. Here is the command you need to execute on terminal.
docker exec -it containerid bash

Suppose your container id is 404d5e3de9c4, so command will be
docker exec -it 404d5e3de9c4 bash
Now another instance of terminal of same container is opened where you can run different commands.