Skip to content

Commit

Permalink
Merge pull request #166 from parkervcp/tini
Browse files Browse the repository at this point in the history
Use tini for some images to fix the ^C  stop bug
  • Loading branch information
parkervcp authored Nov 1, 2023
2 parents 9fe4f0e + 672f672 commit ebe9cde
Show file tree
Hide file tree
Showing 48 changed files with 425 additions and 229 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
with:
buildkitd-flags: --debug
- name: Set up QEMU
uses: docker/setup-qemu-action@master
uses: docker/setup-qemu-action@v2
with:
platforms: arm64,amd64
- name: Cache Docker layers
Expand Down
10 changes: 7 additions & 3 deletions bot/bastion/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@ RUN apt update && apt install --no-install-recommends -y curl \
&& apt install -y nodejs \
&& npm install -g npm@latest \
## install bastion reqs
&& apt install -y python3 build-essential git libtool netcat ffmpeg iproute2 tzdata \
&& apt install -y python3 build-essential git libtool netcat ffmpeg iproute2 tzdata tini \
## add container user
&& useradd -d /home/container -m container -s /bin/bash

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"]
12 changes: 9 additions & 3 deletions bot/red/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM --platform=$TARGETOS/$TARGETARCH python:3.11-slim

LABEL author="Michael Parker" maintainer="[email protected]"


RUN mkdir -p /usr/share/man/man1
RUN apt update \
&& apt -y upgrade \
Expand Down Expand Up @@ -32,7 +33,8 @@ RUN apt update \
libexpat1-dev \
liblzma-dev \
ffmpeg \
imagemagick
imagemagick \
tini

RUN pip install --upgrade pip
RUN pip install python-forecastio tweepy unidecode discord-text-sanitizer mcstatus bs4 sqlalchemy geocoder valve python-valve py-cpuinfo psutil
Expand All @@ -46,5 +48,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"]
10 changes: 7 additions & 3 deletions bot/sinusbot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN apt update \
&& apt upgrade -y \
&& apt install -y ca-certificates less locales pulseaudio python python3 sudo x11vnc x11-xkb-utils xvfb iproute2 ffmpeg curl liblcms2-2 libatomic1 libxcb-xinerama0 fontconfig \
libasound2 libegl1-mesa libglib2.0-0 libnss3 libpci3 libpulse0 libxcursor1 libxslt1.1 libx11-xcb1 libxkbcommon0 bzip2 libxss1 libxcomposite1 libevent-2.1-7 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 \
libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxkbcommon-x11-0 tini \
&& useradd -m -d /home/container container


Expand All @@ -21,5 +21,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"]
10 changes: 7 additions & 3 deletions dart/2.17/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH dart:2.17
LABEL author="Alden Bansemer" maintainer="[email protected]"

RUN apt update \
&& apt -y install iproute2 git ca-certificates tzdata \
&& apt -y install iproute2 git ca-certificates tzdata 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"]
10 changes: 7 additions & 3 deletions dart/2.18/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH dart:2.18
LABEL author="Alden Bansemer" maintainer="[email protected]"

RUN apt update \
&& apt -y install iproute2 git ca-certificates tzdata \
&& apt -y install iproute2 git ca-certificates tzdata 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"]
10 changes: 7 additions & 3 deletions dart/2.19/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ FROM --platform=$TARGETOS/$TARGETARCH dart:2.19
LABEL author="Alden Bansemer" maintainer="[email protected]"

RUN apt update \
&& apt -y install iproute2 git ca-certificates tzdata \
&& apt -y install iproute2 git ca-certificates tzdata 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"]
10 changes: 7 additions & 3 deletions dotnet/2.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/2.1 | grep -i '<h3 id="sdk-2.*">SDK 2.1.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
Expand All @@ -17,5 +17,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"]
10 changes: 7 additions & 3 deletions dotnet/3.1/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/3.1 | grep -i '<h3 id="sdk-3.*">SDK 3.1.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
Expand All @@ -18,5 +18,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"]
10 changes: 7 additions & 3 deletions dotnet/5/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/5.0 | grep -i '<h3 id="sdk-5.*">SDK 5.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
Expand All @@ -17,5 +17,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"]
10 changes: 7 additions & 3 deletions dotnet/6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/6.0 | grep -i '<h3 id="sdk-6.*">SDK 6.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
Expand All @@ -17,5 +17,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"]
9 changes: 6 additions & 3 deletions dotnet/7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ENV DEBIAN_FRONTEND noninteractive

RUN apt update -y \
&& apt upgrade -y \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus \
&& apt install -y apt-transport-https wget curl iproute2 libgdiplus tini \
&& wget https://dot.net/v1/dotnet-install.sh \
&& D_V="$(curl -sSL https://dotnet.microsoft.com/en-us/download/dotnet/7.0 | grep -i '<h3 id="sdk-7.*">SDK 7.*.*</h3>' | head -1 | awk -F\" '{print $3}' | awk '{print $2;}' | sed 's/<\/h3>//g')" \
&& chmod +x dotnet-install.sh \
Expand All @@ -17,6 +17,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"]
10 changes: 7 additions & 3 deletions games/altv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ RUN apt update -y \
&& apt upgrade -y \
&& apt install -y g++ gcc libgcc-s1 lib32gcc-s1 gdb libstdc++6 libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \
libfontconfig1 libicu67 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev libduktape205 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates tzdata \
python3 dnsutils build-essential coreutils jq pcregrep
python3 dnsutils build-essential coreutils jq pcregrep tini

RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
Expand All @@ -27,5 +27,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"]
10 changes: 7 additions & 3 deletions games/samp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apt update \
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt upgrade -y \
&& apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip \
&& apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl fontconfig dirmngr ca-certificates dnsutils tzdata zip tini \
&& apt install -y libtbb2:i386 libtbb-dev:i386 libicu-dev:i386 \
&& useradd -d /home/container -m container

Expand All @@ -19,5 +19,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"]
10 changes: 7 additions & 3 deletions games/source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt upgrade -y \
&& apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata numactl \
&& apt install -y tar curl gcc g++ lib32gcc-s1 libgcc1 libcurl4-gnutls-dev:i386 libssl1.1:i386 libcurl4:i386 lib32tinfo6 libtinfo6:i386 lib32z1 lib32stdc++6 libncurses5:i386 libcurl3-gnutls:i386 libsdl2-2.0-0:i386 iproute2 gdb libsdl1.2debian libfontconfig1 telnet net-tools netcat tzdata numactl tini \
&& useradd -m -d /home/container container

## install rcon
Expand All @@ -45,5 +45,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"]
34 changes: 20 additions & 14 deletions java/11/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,30 @@ 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
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"]
Loading

0 comments on commit ebe9cde

Please sign in to comment.