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..
This commit is contained in:
parent
b0856b558e
commit
3ae497e2eb
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue