Skip to content

fix(base-ssh,ssh-ubuntu): use tini for zombie reaping and signal handling (#565) #566

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions base-ssh/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,16 @@ RUN dnf -y update && \
COPY ssh-entrypoint.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh

ENTRYPOINT ["/usr/local/bin/init.sh"]
# Use tini as an init system to manage orphaned child processes, ensuring they
# don't become zombie (defunct) processes by reaping (cleaning up) them when
# their parent process doesn't.
# Tini will also correctly handle signals like SIGTERM (15), allowing child
# processes to terminate gracefully within the allotted time, rather than
# being forcefully killed with SIGKILL after a 15-second timeout.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/usr/local/bin/init.sh"]

CMD ["tail", "-f", "/dev/null"]

EXPOSE 22
EXPOSE 22
12 changes: 10 additions & 2 deletions base-ssh/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ RUN apt-get update; \
COPY ssh-entrypoint.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh

ENTRYPOINT ["/usr/local/bin/init.sh"]
# Use tini as an init system to manage orphaned child processes, ensuring they
# don't become zombie (defunct) processes by reaping (cleaning up) them when
# their parent process doesn't.
# Tini will also correctly handle signals like SIGTERM (15), allowing child
# processes to terminate gracefully within the allotted time, rather than
# being forcefully killed with SIGKILL after a 15-second timeout.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/usr/local/bin/init.sh"]

CMD ["tail", "-f", "/dev/null"]

EXPOSE 22
EXPOSE 22
12 changes: 10 additions & 2 deletions base-ssh/Dockerfile.suse
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,16 @@ RUN mkdir -p /run/sshd && \
COPY ssh-entrypoint.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh

ENTRYPOINT ["/usr/local/bin/init.sh"]
# Use tini as an init system to manage orphaned child processes, ensuring they
# don't become zombie (defunct) processes by reaping (cleaning up) them when
# their parent process doesn't.
# Tini will also correctly handle signals like SIGTERM (15), allowing child
# processes to terminate gracefully within the allotted time, rather than
# being forcefully killed with SIGKILL after a 15-second timeout.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/usr/local/bin/init.sh"]

CMD ["tail", "-f", "/dev/null"]

EXPOSE 22
EXPOSE 22
12 changes: 10 additions & 2 deletions base-ssh/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ RUN apt-get update; \
COPY ssh-entrypoint.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh

ENTRYPOINT ["/usr/local/bin/init.sh"]
# Use tini as an init system to manage orphaned child processes, ensuring they
# don't become zombie (defunct) processes by reaping (cleaning up) them when
# their parent process doesn't.
# Tini will also correctly handle signals like SIGTERM (15), allowing child
# processes to terminate gracefully within the allotted time, rather than
# being forcefully killed with SIGKILL after a 15-second timeout.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/usr/local/bin/init.sh"]

CMD ["tail", "-f", "/dev/null"]

EXPOSE 22
EXPOSE 22
12 changes: 10 additions & 2 deletions ssh-ubuntu/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ RUN apt-get update; \
COPY ssh-entrypoint.sh /usr/local/bin/init.sh
RUN chmod +x /usr/local/bin/init.sh

ENTRYPOINT ["/usr/local/bin/init.sh"]
# Use tini as an init system to manage orphaned child processes, ensuring they
# don't become zombie (defunct) processes by reaping (cleaning up) them when
# their parent process doesn't.
# Tini will also correctly handle signals like SIGTERM (15), allowing child
# processes to terminate gracefully within the allotted time, rather than
# being forcefully killed with SIGKILL after a 15-second timeout.
ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--", "/usr/local/bin/init.sh"]

CMD ["tail", "-f", "/dev/null"]

EXPOSE 22
EXPOSE 22