Skip to content

Commit 6bb8c6f

Browse files
[Arma 3] Fix SIGINT not getting passed to server (#212)
* Add Tini to Arma 3 * add forgoten tini to Python 3.12 --------- Co-authored-by: Quinten <[email protected]>
1 parent a401057 commit 6bb8c6f

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

bot/red/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ RUN apt update \
3434
liblzma-dev \
3535
ffmpeg \
3636
imagemagick \
37-
tini
37+
tini
3838

3939
RUN pip install --upgrade pip
4040
RUN pip install python-forecastio tweepy unidecode mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil

games/arma3/Dockerfile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ RUN dpkg --add-architecture i386 \
2828
libnss-wrapper \
2929
libnss-wrapper:i386 \
3030
libtbb2 \
31-
libtbb2:i386
31+
libtbb2:i386 \
32+
tini
3233

3334
## Configure locale
3435
RUN update-locale lang=en_US.UTF-8 \
@@ -47,6 +48,11 @@ USER container
4748
ENV USER=container HOME=/home/container
4849
WORKDIR /home/container
4950

50-
## Copy over and execute entrypoint.sh
51-
COPY ./entrypoint.sh /entrypoint.sh
52-
CMD [ "/bin/bash", "/entrypoint.sh" ]
51+
## Copy over entrypoint.sh and set permissions
52+
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh
53+
RUN chmod +x /entrypoint.sh
54+
55+
## Start with Tini to pass future stop signals correctly
56+
STOPSIGNAL SIGINT
57+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
58+
CMD ["/entrypoint.sh"]

python/3.12/Dockerfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim
33
LABEL author="Michael Parker" maintainer="[email protected]"
44

55
RUN apt update \
6-
&& apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps \
6+
&& apt -y install git gcc g++ ca-certificates dnsutils curl iproute2 ffmpeg procps tini \
77
&& useradd -m -d /home/container container
88

99
USER container
1010
ENV USER=container HOME=/home/container
1111
WORKDIR /home/container
1212

13-
COPY ./../entrypoint.sh /entrypoint.sh
14-
CMD [ "/bin/bash", "/entrypoint.sh" ]
13+
STOPSIGNAL SIGINT
14+
15+
COPY --chown=container:container ./../entrypoint.sh /entrypoint.sh
16+
RUN chmod +x /entrypoint.sh
17+
ENTRYPOINT ["/usr/bin/tini", "-g", "--"]
18+
CMD ["/entrypoint.sh"]

0 commit comments

Comments
 (0)