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