diff --git a/.github/workflows/games.yml b/.github/workflows/games.yml index 733d44a25..d59e1b37d 100644 --- a/.github/workflows/games.yml +++ b/.github/workflows/games.yml @@ -50,6 +50,7 @@ jobs: matrix: game: - minetest + - mta steps: - uses: actions/checkout@v3 - name: Set up QEMU diff --git a/README.md b/README.md index df1e067b7..d8ed1a396 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,8 @@ is tagged correctly. * `ghcr.io/parkervcp/games:minetest` * [`mohaa`](games/mohaa) * `ghcr.io/pterodactyl/games:mohaa` +* [`Multi Theft Auto: San Andreas`](games/mta) + * `ghcr.io/pterodactyl/games:mta` * [`samp`](/games/samp) * `ghcr.io/parkervcp/games:samp` * [`source`](/games/source) diff --git a/games/mta/Dockerfile b/games/mta/Dockerfile new file mode 100644 index 000000000..baa9d17b0 --- /dev/null +++ b/games/mta/Dockerfile @@ -0,0 +1,23 @@ +FROM --platform=$TARGETOS/$TARGETARCH ubuntu:20.04 + +ENV DEBIAN_FRONTEND noninteractive + +## add container user +RUN useradd -m -d /home/container -s /bin/bash container + +## update base packages +RUN apt update \ + && apt upgrade -y + +## install dependencies +RUN apt install -y iproute2 tar libssl1.1 curl git default-libmysqlclient-dev libmysqlclient-dev libreadline-gplv2-dev libncurses5-dev libncursesw5-dev \ + libtool zip unzip libncurses5 libncursesw5 python3 openssl locales ffmpeg apt-transport-https libc6 binutils xz-utils liblua5.1-0 + +## configure locale +RUN update-locale lang=en_US.UTF-8 \ + && dpkg-reconfigure --frontend noninteractive locales + +WORKDIR /home/container + +COPY ./entrypoint.sh /entrypoint.sh +CMD [ "/bin/bash", "/entrypoint.sh" ] \ No newline at end of file diff --git a/games/mta/entrypoint.sh b/games/mta/entrypoint.sh new file mode 100644 index 000000000..7ed5b2856 --- /dev/null +++ b/games/mta/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e $(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')) +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file