From 76a643b8dede52eedf7b447eb4cfbfb821f360ab Mon Sep 17 00:00:00 2001 From: darksaid98 Date: Fri, 17 Nov 2023 15:00:43 +0100 Subject: [PATCH] merge: Add tini to some more images Co-Authored-By: Quinten <67589015+quintenqvd0@users.noreply.github.com> --- apps/uptimekuma/Dockerfile | 13 +++++++++---- bun/canary/Dockerfile | 9 ++++++--- bun/latest/Dockerfile | 9 ++++++--- elixir/1.12/Dockerfile | 9 ++++++--- elixir/1.13/Dockerfile | 9 ++++++--- elixir/1.14/Dockerfile | 9 ++++++--- elixir/1.15/Dockerfile | 9 ++++++--- elixir/latest/Dockerfile | 9 ++++++--- games/valheim/Dockerfile | 14 +++++++++----- 9 files changed, 60 insertions(+), 30 deletions(-) diff --git a/apps/uptimekuma/Dockerfile b/apps/uptimekuma/Dockerfile index 06c1f56..26fdf9f 100644 --- a/apps/uptimekuma/Dockerfile +++ b/apps/uptimekuma/Dockerfile @@ -29,9 +29,10 @@ RUN apk add --no-cache \ sqlite \ tzdata \ zip \ - libc6-compat + libc6-compat \ + tini -# updating npm +# updating npm RUN npm install npm@latest -g # download cloudflared @@ -49,5 +50,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -COPY ./entrypoint.sh /entrypoint.sh -CMD ["/bin/ash", "/entrypoint.sh"] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/sbin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/bun/canary/Dockerfile b/bun/canary/Dockerfile index 5078d5d..b7e65ff 100644 --- a/bun/canary/Dockerfile +++ b/bun/canary/Dockerfile @@ -12,6 +12,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/bun/latest/Dockerfile b/bun/latest/Dockerfile index 57cd00e..c5f7010 100644 --- a/bun/latest/Dockerfile +++ b/bun/latest/Dockerfile @@ -12,6 +12,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.12/Dockerfile b/elixir/1.12/Dockerfile index 35cc661..2e7f0d9 100644 --- a/elixir/1.12/Dockerfile +++ b/elixir/1.12/Dockerfile @@ -10,6 +10,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.13/Dockerfile b/elixir/1.13/Dockerfile index 79cc3dc..b7d78ed 100644 --- a/elixir/1.13/Dockerfile +++ b/elixir/1.13/Dockerfile @@ -10,6 +10,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.14/Dockerfile b/elixir/1.14/Dockerfile index f5f08ca..eacdc1c 100644 --- a/elixir/1.14/Dockerfile +++ b/elixir/1.14/Dockerfile @@ -10,6 +10,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/1.15/Dockerfile b/elixir/1.15/Dockerfile index 2449340..2903b15 100644 --- a/elixir/1.15/Dockerfile +++ b/elixir/1.15/Dockerfile @@ -10,6 +10,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/elixir/latest/Dockerfile b/elixir/latest/Dockerfile index 1eeb9f5..ec60892 100644 --- a/elixir/latest/Dockerfile +++ b/elixir/latest/Dockerfile @@ -10,6 +10,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -ENTRYPOINT [] -COPY ./../entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/games/valheim/Dockerfile b/games/valheim/Dockerfile index aa6559d..7cdf9b1 100644 --- a/games/valheim/Dockerfile +++ b/games/valheim/Dockerfile @@ -14,7 +14,7 @@ RUN apt update \ ## Install dependencies RUN apt install -y libc++-dev liblzo2-2 cabextract net-tools libatomic1 libsdl1.2debian libsdl2-2.0-0 \ libfontconfig libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadbclient-dev-compat libduktape205 ffmpeg apt-transport-https software-properties-common ca-certificates \ - libz-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libgdiplus + libz-dev rapidjson-dev tzdata libevent-dev libzip4 libsdl2-mixer-2.0-0 libsdl2-image-2.0-0 libgdiplus tini RUN dpkg --add-architecture armhf \ && apt update -y \ @@ -43,10 +43,14 @@ WORKDIR /home/container ## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim requiring a valid UID ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ - && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} + && chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \ + && chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} ADD passwd.template /passwd.template -COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"]