From 70e5a4321ac4db5f541f0c254a9fc6434fbe866e Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Mon, 2 May 2022 17:30:09 +0200 Subject: [PATCH 1/3] add samp image --- .github/workflows/games.yml | 1 + README.md | 2 ++ games/samp/Dockerfile | 23 +++++++++++++++++++++++ games/samp/entrypoint.sh | 12 ++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 games/samp/Dockerfile create mode 100644 games/samp/entrypoint.sh diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 2a84791..53e7d85 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -19,6 +19,7 @@ jobs: - altv - arma3 - source + - samp steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/README.md b/README.md index fa04efe..b6aef34 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ is tagged correctly. * `ghcr.io/parkervcp/games:arma3` * [`source`](/games/source) * `ghcr.io/parkervcp/games:source` +* [`samp`](/games/samp) + * `ghcr.io/parkervcp/games:samp` ### [Golang](/go) diff --git a/games/samp/Dockerfile b/games/samp/Dockerfile new file mode 100644 index 0000000..3e05c2f --- /dev/null +++ b/games/samp/Dockerfile @@ -0,0 +1,23 @@ +FROM --platform=$BUILDPLATFORM debian:bullseye-slim + +LABEL author="QuintenQVD" maintainer="josdekurk@gmail.com" + +RUN apt update \ + && apt -y upgrade +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 libtbb2:i386 libtbb-dev:i386 libicu-dev:i386 tzdata \ + && useradd -d /home/container -m container + +RUN mkdir -p /run/systemd && echo 'docker' > /run/systemd/container +RUN rm -rf /var/lib/apt/lists/* + + +USER container +ENV USER=container HOME=/home/container +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/samp/entrypoint.sh b/games/samp/entrypoint.sh new file mode 100644 index 0000000..6dda5e5 --- /dev/null +++ b/games/samp/entrypoint.sh @@ -0,0 +1,12 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +export INTERNAL_IP=`ip route get 1 | awk '{print $(NF-2);exit}'` + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} From 73a2340b3be9ffc1b540eb1d1a90eada3cca8a28 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Mon, 2 May 2022 17:54:08 +0200 Subject: [PATCH 2/3] fix alphabetical orde --- .github/workflows/games.yml | 3 ++- README.md | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 53e7d85..d4ec133 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -18,8 +18,9 @@ jobs: game: - altv - arma3 - - source - samp + - source + steps: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 diff --git a/README.md b/README.md index b6aef34..e0ddbbe 100644 --- a/README.md +++ b/README.md @@ -79,10 +79,11 @@ is tagged correctly. * `ghcr.io/parkervcp/games:altv` * [`arma3`](/games/arma3) * `ghcr.io/parkervcp/games:arma3` +* [`samp`](/games/samp) + * `ghcr.io/parkervcp/games:samp` * [`source`](/games/source) * `ghcr.io/parkervcp/games:source` -* [`samp`](/games/samp) - * `ghcr.io/parkervcp/games:samp` + ### [Golang](/go) From bb84c74981cf488bd03b88c5d1234b86e5b55a11 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Tue, 3 May 2022 07:06:37 +0200 Subject: [PATCH 3/3] Fix double tzdata install --- games/samp/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/games/samp/Dockerfile b/games/samp/Dockerfile index 3e05c2f..e1b5ff4 100644 --- a/games/samp/Dockerfile +++ b/games/samp/Dockerfile @@ -8,7 +8,7 @@ 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 libtbb2:i386 libtbb-dev:i386 libicu-dev:i386 tzdata \ + && apt install -y libtbb2:i386 libtbb-dev:i386 libicu-dev:i386 \ && useradd -d /home/container -m container RUN mkdir -p /run/systemd && echo 'docker' > /run/systemd/container @@ -20,4 +20,4 @@ ENV USER=container HOME=/home/container WORKDIR /home/container COPY ./entrypoint.sh /entrypoint.sh -CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file +CMD [ "/bin/bash", "/entrypoint.sh" ]