29163/enter-in-a-docker-container-already-running-with-a-new-tty
My container is running the Apache service in the foreground. I need to access the container from another shell in order to "poke around" inside it and examine the files. At the moment, I have left looking at the Apache daemon and unable to run any commands. Is it possible to attach another tty to a running container? Possibly, I can take advantage of the fact that Docker is actually just wrapping around LXC containers? I have used sudo lxc-console -n [container-id] -t [1-4] but it appears that only one tty is made available and that is the one running the apache daemon. Perhaps there is a way to enable multiple lxc consoles during the build?
Here is what you can try.
For docker 1.3 and above, there is a new command docker exec. This allows you to enter a running docker container:
docker exec -it [container-id] bash
I hope that this will work for you.
Restart an existing container after you exited ...READ MORE
Hi @Yuvraj! Yes, this is possible. You can ...READ MORE
You can set the following two parameters ...READ MORE
You need to remove container "registry-v1". Run docker rm ...READ MORE
Hey @nmentityvibes, you seem to be using ...READ MORE
It can work if you try to put ...READ MORE
When you use docker-compose down, all the ...READ MORE
Try using ingress itself in this manner except ...READ MORE
One of the way could be copy ...READ MORE
If there are changes to roll out, ...READ MORE
OR
At least 1 upper-case and 1 lower-case letter
Minimum 8 characters and Maximum 50 characters
Already have an account? Sign in.