Files
docker-garrysmod/latest/Dockerfile

62 lines
1.5 KiB
Docker
Raw Normal View History

2017-01-16 14:19:44 +01:00
FROM hackebein/steamcmd:latest
ARG BASEDIR=/opt/garrysmod
ONBUILD ARG BASEDIR=$BASEDIR
2017-01-16 14:19:44 +01:00
ENV BASEDIR=$BASEDIR \
PORT="27015" \
TICKRATE="66" \
MAXPLAYERS="16" \
2017-01-16 14:19:44 +01:00
#http://steamcommunity.com/dev/apikey
AUTHKEY="" \
WORKSHOPCOLLECTIONID="" \
2017-01-16 14:19:44 +01:00
CLIENTPORT="27005" \
# sandbox or terrortown
2017-01-16 14:19:44 +01:00
GAMEMODE="sandbox" \
MAP="gm_flatgrass" \
#http://steamcommunity.com/dev/managegameservers APPID: 4000
GLST="" \
2017-12-06 23:15:39 +01:00
CONFIG="${GAMEMODE}.cfg" \
2017-01-16 14:19:44 +01:00
CUSTOMPARAMETERS=""
2018-05-31 00:30:39 +01:00
RUN apt-get update -q \
&& apt-get install -yqq lib32tinfo5 gdb \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
2018-05-31 00:47:54 +01:00
/var/tmp/* \
2018-05-31 00:30:39 +01:00
&& /usr/games/steamcmd \
+login anonymous \
+force_install_dir $BASEDIR \
# cstrike
+app_update 232330 -validate -language en \
# garrysmod
+app_update 4020 -validate -language en \
2018-05-31 00:30:39 +01:00
+quit \
&& rm -rf $BASEDIR/garrysmod/cfg/*
2017-01-16 14:19:44 +01:00
COPY cfg $BASEDIR/garrysmod/cfg
WORKDIR $BASEDIR
EXPOSE 27015/udp
2017-01-16 14:19:44 +01:00
CMD [ \
"sh", \
"-c", \
"$BASEDIR/srcds_run \
-game garrysmod \
-strictportbind \
-port ${PORT} \
-tickrate ${TICKRATE} \
-maxplayers ${MAXPLAYERS} \
2017-01-16 14:19:44 +01:00
-authkey ${AUTHKEY} \
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
2017-01-16 14:19:44 +01:00
+clientport ${CLIENTPORT} \
+gamemode ${GAMEMODE} \
+map ${MAP} \
+sv_setsteamaccount ${GLST} \
+servercfgfile ${CONFIG} \
${CUSTOMPARAMETERS}" \
]