Skip to content

Commit

Permalink
fix(base-ssh,ssh-ubuntu): use tini for zombie reaping (akash-network#565
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andy108369 committed Aug 22, 2024
1 parent 86e5ab0 commit f9485ca
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 10 deletions.
9 changes: 7 additions & 2 deletions base-ssh/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ 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.
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
9 changes: 7 additions & 2 deletions base-ssh/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ 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.
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
9 changes: 7 additions & 2 deletions base-ssh/Dockerfile.suse
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@ 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.
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
9 changes: 7 additions & 2 deletions base-ssh/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ 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.
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
9 changes: 7 additions & 2 deletions ssh-ubuntu/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ 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.
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

0 comments on commit f9485ca

Please sign in to comment.