In this post, we will see how to resolve How to permit SSH connexion to a docker container with complete prompt?
Question:I try to deploy debian containers to allow users to connect to them over SSH (for students for exemple).
I managed to do this but when I am connected to the container I have a pseudo-TTY and it’s not the expected result I want. I want to have a complete interactive shell like when we connect to a reel server or machine.
I tried several ideas like :
change the docker add options in my
docker runcommands like :
docker run -d -it CONAINER_ID
sshd_configin the debian container to allow TTY
change my dockerfile many times
sshoptions when I connect :
But any of theses ideas seems to help me. I show you my current Dockerfile it can be helpfull.
Best Answer:I solved this problem with adding just one option in my Dockerfile when I create the user :
If you have better answer, please add a comment about this, thank you!