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.
Suppose your container id is 404d5e3de9c4, so command will be
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 bashNow another instance of terminal of same container is opened where you can run different commands.
No comments:
Post a Comment