wodby / php

Generic PHP docker container images
MIT License
155 stars 103 forks source link

Cannot stop/start sshd container #14

Closed mcrump001 closed 6 years ago

mcrump001 commented 7 years ago

Hello,

As the title suggests it is not possible to do stop/start with the sshd container. The container will not restart after a stop operation.

Run:

docker-compose stop docker-compose start -d

Check containers using portainer or other tool. Notice the sshd container is stopped. Checking logs shows that the container attempted to regenerate the server ssh key file (/etc/ssh/ssh_host_rsa_key). Since the container was being restarted instead of recreated the server ssh key file already exists and causes a prompt for overwrite.

One way to fix would be to add a check for the existence of the key.

Cheers,

Michael

csandanov commented 6 years ago

Seems to be fixed