-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ jobs: | |
- samp | ||
- screeps | ||
- staxel | ||
- thebattleofwesnod | ||
- thefront | ||
- valheim | ||
- wurm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 | ||
|
||
LABEL author="Michael Parker" maintainer="[email protected]" | ||
|
||
ARG DEBIAN_FRONTEND noninteractive | ||
|
||
# update base packages | ||
RUN apt update \ | ||
&& apt upgrade -y | ||
|
||
# install dependencies | ||
RUN apt install -y \ | ||
cmake \ | ||
g++ \ | ||
gcc \ | ||
gdb \ | ||
git \ | ||
openssl \ | ||
tar \ | ||
tini \ | ||
unzip \ | ||
zip \ | ||
zlib1g-dev \ | ||
libboost-coroutine-dev \ | ||
libboost-filesystem-dev \ | ||
libboost-graph-dev \ | ||
libboost-iostreams-dev \ | ||
libboost-locale-dev \ | ||
libboost-program-options-dev \ | ||
libboost-random-dev \ | ||
libboost-regex-dev \ | ||
libboost-system-dev \ | ||
libbz2-dev \ | ||
libc++-dev \ | ||
libc6 \ | ||
libcairo2-dev \ | ||
libcrypto++-dev \ | ||
libcurl4-openssl-dev \ | ||
libgcc1 \ | ||
libsdl-pango-dev \ | ||
libsdl2-dev \ | ||
libsdl2-image-dev \ | ||
libsdl2-mixer-dev \ | ||
libssl-dev \ | ||
libvorbis-dev \ | ||
|
||
# configure locale | ||
RUN update-locale lang=en_US.UTF-8 \ | ||
&& dpkg-reconfigure --frontend noninteractive locales | ||
|
||
## add container user | ||
RUN useradd -m -d /home/container -s /bin/bash container | ||
USER container | ||
ENV USER=container HOME=/home/container | ||
WORKDIR /home/container | ||
|
||
STOPSIGNAL SIGINT | ||
|
||
COPY --chown=container:container ./entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT ["/usr/bin/tini", "-g", "--"] | ||
CMD ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Wait for the container to fully initialize | ||
sleep 1 | ||
|
||
# Default the TZ environment variable to UTC. | ||
TZ=${TZ:-UTC} | ||
export TZ | ||
|
||
# Set environment variable that holds the Internal Docker IP | ||
INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') | ||
export INTERNAL_IP | ||
|
||
# Switch to the container's working directory | ||
cd /home/container || exit 1 | ||
|
||
# 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} |