File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ RUN apt update \
34
34
liblzma-dev \
35
35
ffmpeg \
36
36
imagemagick \
37
- tini
37
+ tini
38
38
39
39
RUN pip install --upgrade pip
40
40
RUN pip install python-forecastio tweepy unidecode mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ RUN dpkg --add-architecture i386 \
28
28
libnss-wrapper \
29
29
libnss-wrapper:i386 \
30
30
libtbb2 \
31
- libtbb2:i386
31
+ libtbb2:i386 \
32
+ tini
32
33
33
34
# # Configure locale
34
35
RUN update-locale lang=en_US.UTF-8 \
@@ -47,6 +48,11 @@ USER container
47
48
ENV USER=container HOME=/home/container
48
49
WORKDIR /home/container
49
50
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" ]
Original file line number Diff line number Diff line change @@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH python:3.12-slim
3
3
LABEL author=
"Michael Parker" maintainer=
"[email protected] "
4
4
5
5
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 \
7
7
&& useradd -m -d /home/container container
8
8
9
9
USER container
10
10
ENV USER=container HOME=/home/container
11
11
WORKDIR /home/container
12
12
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" ]
You can’t perform that action at this time.
0 commit comments