Skip to content

Commit

Permalink
Generate Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dgibbs64 committed Sep 28, 2024
1 parent 5541e52 commit 25a1ed7
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
29 changes: 29 additions & 0 deletions dockerfiles/Dockerfile.sm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# LinuxGSM Soulmask Dockerfile
#
# https://github.com/GameServerManagers/docker-gameserver
#

FROM gameservermanagers/linuxgsm:ubuntu-22.04
LABEL maintainer="LinuxGSM <[email protected]>"
ARG SHORTNAME=sm
ENV GAMESERVER=smserver

WORKDIR /app

## Auto install game server requirements
RUN depshortname=$(curl --connect-timeout 10 -s https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/ubuntu-22.04.csv |awk -v shortname="sm" -F, '$1==shortname {$1=""; print $0}') \
&& if [ -n "${depshortname}" ]; then \
echo "**** Install ${depshortname} ****" \
&& apt-get update \
&& apt-get install -y ${depshortname} \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
fi

HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1

RUN date > /build-time.txt

ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]
29 changes: 29 additions & 0 deletions dockerfiles/Dockerfile.xnt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#
# LinuxGSM Xonotic Dockerfile
#
# https://github.com/GameServerManagers/docker-gameserver
#

FROM gameservermanagers/linuxgsm:ubuntu-22.04
LABEL maintainer="LinuxGSM <[email protected]>"
ARG SHORTNAME=xnt
ENV GAMESERVER=xntserver

WORKDIR /app

## Auto install game server requirements
RUN depshortname=$(curl --connect-timeout 10 -s https://raw.githubusercontent.com/GameServerManagers/LinuxGSM/master/lgsm/data/ubuntu-22.04.csv |awk -v shortname="xnt" -F, '$1==shortname {$1=""; print $0}') \
&& if [ -n "${depshortname}" ]; then \
echo "**** Install ${depshortname} ****" \
&& apt-get update \
&& apt-get install -y ${depshortname} \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*; \
fi

HEALTHCHECK --interval=1m --timeout=1m --start-period=2m --retries=1 CMD /app/entrypoint-healthcheck.sh || exit 1

RUN date > /build-time.txt

ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]

0 comments on commit 25a1ed7

Please sign in to comment.