From 7e2ffbbfd8349408007a18340a02d6d34777a3c5 Mon Sep 17 00:00:00 2001 From: MarcoCoreDuo <90222533+MarcoCoreDuo@users.noreply.github.com> Date: Thu, 30 Nov 2023 22:37:59 +0100 Subject: [PATCH] Add tini to java 21 Dockerfile --- java/21/Dockerfile | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/java/21/Dockerfile b/java/21/Dockerfile index a372bffb0..b69070358 100644 --- a/java/21/Dockerfile +++ b/java/21/Dockerfile @@ -6,18 +6,19 @@ LABEL org.opencontainers.image.source="https://github.com/pterodactyl/yolk LABEL org.opencontainers.image.licenses=MIT RUN apt update -y \ - && apt install -y \ - curl \ - lsof \ - ca-certificates \ - openssl \ - git \ - tar \ - sqlite3 \ - fontconfig \ - tzdata \ - iproute2 \ - libfreetype6 + && apt install -y \ + curl \ + lsof \ + ca-certificates \ + openssl \ + git \ + tar \ + sqlite3 \ + fontconfig \ + tzdata \ + iproute2 \ + libfreetype6 \ + tini ## Setup user and working directory RUN useradd -m -d /home/container -s /bin/bash container @@ -25,5 +26,9 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -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"]