add samp image

This commit is contained in:
Quinten
2022-05-02 17:30:09 +02:00
committed by GitHub
parent cd6b949868
commit 70e5a4321a
4 changed files with 38 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ jobs:
- altv - altv
- arma3 - arma3
- source - source
- samp
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1 - uses: docker/setup-buildx-action@v1

View File

@@ -81,6 +81,8 @@ is tagged correctly.
* `ghcr.io/parkervcp/games:arma3` * `ghcr.io/parkervcp/games:arma3`
* [`source`](/games/source) * [`source`](/games/source)
* `ghcr.io/parkervcp/games:source` * `ghcr.io/parkervcp/games:source`
* [`samp`](/games/samp)
* `ghcr.io/parkervcp/games:samp`
### [Golang](/go) ### [Golang](/go)

23
games/samp/Dockerfile Normal file
View File

@@ -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" ]

12
games/samp/entrypoint.sh Normal file
View File

@@ -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}