Merge pull request #54 from QuintenQVD0/samp

add samp image
This commit is contained in:
Michael (Parker) Parker
2022-05-03 15:53:18 -04:00
committed by GitHub
4 changed files with 40 additions and 0 deletions

View File

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

View File

@@ -79,9 +79,12 @@ 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`
### [Golang](/go)
* [`go1.14`](/go/1.14)

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 \
&& 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}