diff --git a/bot/red/Dockerfile b/bot/red/Dockerfile index f66d86148..0e06a096c 100644 --- a/bot/red/Dockerfile +++ b/bot/red/Dockerfile @@ -34,7 +34,7 @@ RUN apt update \ liblzma-dev \ ffmpeg \ imagemagick \ - tini + tini RUN pip install --upgrade pip RUN pip install python-forecastio tweepy unidecode mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil diff --git a/games/arma3/Dockerfile b/games/arma3/Dockerfile index d6860f3c9..1cb2e268f 100644 --- a/games/arma3/Dockerfile +++ b/games/arma3/Dockerfile @@ -28,7 +28,8 @@ RUN dpkg --add-architecture i386 \ libnss-wrapper \ libnss-wrapper:i386 \ libtbb2 \ - libtbb2:i386 + libtbb2:i386 \ + tini ## Configure locale RUN update-locale lang=en_US.UTF-8 \ @@ -47,6 +48,11 @@ USER container ENV USER=container HOME=/home/container WORKDIR /home/container -## Copy over and execute entrypoint.sh -COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] +## Copy over entrypoint.sh and set permissions +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh + +## Start with Tini to pass future stop signals correctly +STOPSIGNAL SIGINT +ENTRYPOINT ["/usr/bin/tini", "-g", "--"] +CMD ["/entrypoint.sh"] diff --git a/python/3.12/Dockerfile b/python/3.12/Dockerfile index 8c830e4b5..14b1a3fa6 100644 --- a/python/3.12/Dockerfile +++ b/python/3.12/Dockerfile @@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim LABEL author="Michael Parker" maintainer="parker@pterodactyl.io" RUN apt update \ - && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps \ + && apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \ && useradd -m -d /home/container container 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"]