Let the container stop gracefully with exec!

Right now the container can't stop gracefully because the sshd-server
runs on the server as PID 0. This results in the docker daemon not
killing it but waiting for it to die, which never happens, and results
in the default timeout-wait before it KILLS the process. With exec, the
sshd becomes PID 1 and can receive and process signals(probably SIGTERM
here) and handles them as well. The container stops now nearly
instantly..
pull/4/head
Darksider3 5 years ago
parent b0856b558e
commit 3ae497e2eb

@ -42,4 +42,4 @@ RUN touch /app/data/applications.log
#RUN setfacl -R -m u:tilde:rwx /app/data/
RUN chown -R tilde /app/data
RUN mkdir /app/user/.ssh
CMD ["sh", "-c", " echo TILDE_CONF=$TILDE_CONF > /app/user/.ssh/environment && /usr/sbin/sshd -D"]
CMD ["sh", "-c", " echo TILDE_CONF=$TILDE_CONF > /app/user/.ssh/environment && exec /usr/sbin/sshd -D"]

Loading…
Cancel
Save