Why the RUN command in this dockerfile is not working
Why the RUN command in this dockerfile is not working
I have a docker image MyBaseImage where I have Open SSH server installed. Now in the docker file, I have the following. Download base image FROM MyBaseImage RUN service ssh start I build the new image by typing docker build . But when I run the new image by typing docker run -it ID of my new image If I type service ssh status inside the terminal of that container, it says sshd is not running I have to then manually start the Open SSH server by typing service ssh start. What could be the reason for it
Depending on which distro of linux you are using command slightly changes: If you are using ubuntu your start command should work. But if your base image is centosRHEL try below: service sshd start
Комментарии
Отправить комментарий