Skip to content

Commit

Permalink
Merge pull request #197 from parkervcp/mta
Browse files Browse the repository at this point in the history
add mta image
  • Loading branch information
parkervcp authored Oct 27, 2023
2 parents 55c1096 + 3f46cef commit 9fe4f0e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/games.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
matrix:
game:
- minetest
- mta
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
23 changes: 23 additions & 0 deletions games/mta/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
13 changes: 13 additions & 0 deletions games/mta/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 9fe4f0e

Please sign in to comment.