Docker container with SSH

banderas20

Member
Joined
Aug 1, 2018
Messages
96
Reaction score
39
Credits
746
Hi.

I'm running some tests and I have to launch 2 docker instances with SSH server on them.
I use centos or other images, but I'm unable to issue the command "service" from within them to see the status of the sshd.

I have also tried to install ssh-server by 2 means:
1. With a dockerfile and then building a custom image.
2. From inside the docker instance by issuing apt-get install openssh-server

I have not succeeded in either case.

¿What am I doing wrong?

Thanks!
 


You use the docker exec command to access the shell in a container.
 

Members online


Latest posts

Top