Skip to content

Commit

Permalink
[Arma 3] Fix SIGINT not getting passed to server (#212)
Browse files Browse the repository at this point in the history
* Add Tini to Arma 3
* add forgoten tini to Python 3.12


---------

Co-authored-by: Quinten <67589015+QuintenQVD0@users.noreply.github.com>
  • Loading branch information
redthirten and QuintenQVD0 authored Dec 19, 2023
1 parent a401057 commit 6bb8c6f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bot/red/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 10 additions & 4 deletions games/arma3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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"]
10 changes: 7 additions & 3 deletions python/3.12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 6bb8c6f

Please sign in to comment.