Add Onbuild Basedir Argument
Reduce Cache Layers Remove Volumes Fix Ports Fix exec config
This commit is contained in:
parent
77376de844
commit
c6900fb0d8
@ -1,48 +1,44 @@
|
||||
FROM hackebein/steamcmd:latest
|
||||
|
||||
ARG BASEDIR=/opt/garrysmod
|
||||
ONBUILD ARG BASEDIR=$BASEDIR
|
||||
|
||||
ENV BASEDIR=$BASEDIR \
|
||||
PORT="27015" \
|
||||
TICKRATE="66" \
|
||||
WORKSHOPCOLLECTIONID="" \
|
||||
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" \
|
||||
MAXPLAYERS="16" \
|
||||
LOADURLIMG="http://www.pixelstalk.net/wp-content/uploads/2016/03/Cracked-Screen-Background-cute.jpg" \
|
||||
LOADURL="data:text/html, <style>html, body{ padding:0;margin:0;background:#000 }</style><img src='${LOADURLIMG}' width='100%' height='100%'>" \
|
||||
CUSTOMPARAMETERS=""
|
||||
|
||||
RUN apt-get update -q && \
|
||||
apt-get install -yqq lib32tinfo5 && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN /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 /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
|
||||
|
||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
||||
|
||||
WORKDIR $BASEDIR
|
||||
|
||||
EXPOSE 27015/udp 27015/tcp
|
||||
EXPOSE 27015/udp
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD [ \
|
||||
"sh", \
|
||||
"-c", \
|
||||
@ -51,14 +47,13 @@ CMD [ \
|
||||
-strictportbind \
|
||||
-port ${PORT} \
|
||||
-tickrate ${TICKRATE} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
-authkey ${AUTHKEY} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
+clientport ${CLIENTPORT} \
|
||||
+gamemode ${GAMEMODE} \
|
||||
+map ${MAP} \
|
||||
+sv_setsteamaccount ${GLST} \
|
||||
+servercfgfile ${CONFIG} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
+sv_loadingurl ${LOADURL} \
|
||||
${CUSTOMPARAMETERS}" \
|
||||
]
|
4
latest/cfg/sandbox.cfg
Normal file
4
latest/cfg/sandbox.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - sandbox - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/sandbox.txt
|
||||
exec server.cfg
|
||||
exec my.sandbox.cfg
|
@ -1,2 +1,3 @@
|
||||
// Garry's Mod - Config
|
||||
exec ../volume/server.cfg
|
||||
// https://developer.valvesoftware.com/wiki/Console_Command_List
|
||||
exec my.server.cfg
|
4
latest/cfg/terrortown.cfg
Normal file
4
latest/cfg/terrortown.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - terrortown - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/terrortown.txt
|
||||
exec server.cfg
|
||||
exec my.terrortown.cfg
|
@ -1,46 +1,42 @@
|
||||
FROM hackebein/steamcmd:latest
|
||||
|
||||
ARG BASEDIR=/opt/garrysmod
|
||||
ONBUILD ARG BASEDIR=$BASEDIR
|
||||
|
||||
ENV BASEDIR=$BASEDIR \
|
||||
PORT="27015" \
|
||||
TICKRATE="66" \
|
||||
WORKSHOPCOLLECTIONID="" \
|
||||
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" \
|
||||
MAXPLAYERS="16" \
|
||||
LOADURLIMG="http://www.pixelstalk.net/wp-content/uploads/2016/03/Cracked-Screen-Background-cute.jpg" \
|
||||
LOADURL="data:text/html, <style>html, body{ padding:0;margin:0;background:#000 }</style><img src='${LOADURLIMG}' width='100%' height='100%'>" \
|
||||
CUSTOMPARAMETERS=""
|
||||
|
||||
RUN apt-get update -q && \
|
||||
apt-get install -yqq lib32tinfo5 && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN /usr/games/steamcmd \
|
||||
+login anonymous \
|
||||
+force_install_dir $BASEDIR \
|
||||
# garrysmod
|
||||
+app_update 4020 -validate -language en \
|
||||
+quit && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||
/usr/games/steamcmd \
|
||||
+login anonymous \
|
||||
+force_install_dir $BASEDIR \
|
||||
# garrysmod
|
||||
+app_update 4020 -validate -language en \
|
||||
+quit && \
|
||||
rm -rf $BASEDIR/garrysmod/cfg/*
|
||||
|
||||
COPY cfg $BASEDIR/garrysmod/cfg
|
||||
|
||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
||||
|
||||
WORKDIR $BASEDIR
|
||||
|
||||
EXPOSE 27015/udp 27015/tcp
|
||||
EXPOSE 27015/udp
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD [ \
|
||||
"sh", \
|
||||
"-c", \
|
||||
@ -49,14 +45,13 @@ CMD [ \
|
||||
-strictportbind \
|
||||
-port ${PORT} \
|
||||
-tickrate ${TICKRATE} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
-authkey ${AUTHKEY} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
+clientport ${CLIENTPORT} \
|
||||
+gamemode ${GAMEMODE} \
|
||||
+map ${MAP} \
|
||||
+sv_setsteamaccount ${GLST} \
|
||||
+servercfgfile ${CONFIG} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
+sv_loadingurl ${LOADURL} \
|
||||
${CUSTOMPARAMETERS}" \
|
||||
]
|
4
minimal/cfg/sandbox.cfg
Normal file
4
minimal/cfg/sandbox.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - sandbox - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/sandbox.txt
|
||||
exec server.cfg
|
||||
exec my.sandbox.cfg
|
@ -1,2 +1,3 @@
|
||||
// Garry's Mod - Config
|
||||
exec ../volume/server.cfg
|
||||
// https://developer.valvesoftware.com/wiki/Console_Command_List
|
||||
exec my.server.cfg
|
4
minimal/cfg/terrortown.cfg
Normal file
4
minimal/cfg/terrortown.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - terrortown - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/terrortown.txt
|
||||
exec server.cfg
|
||||
exec my.terrortown.cfg
|
@ -1,48 +1,44 @@
|
||||
FROM hackebein/steamcmd:latest
|
||||
|
||||
ARG BASEDIR=/opt/garrysmod
|
||||
ONBUILD ARG BASEDIR=$BASEDIR
|
||||
|
||||
ENV BASEDIR=$BASEDIR \
|
||||
PORT="27015" \
|
||||
TICKRATE="66" \
|
||||
WORKSHOPCOLLECTIONID="" \
|
||||
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" \
|
||||
MAXPLAYERS="16" \
|
||||
LOADURLIMG="http://www.pixelstalk.net/wp-content/uploads/2016/03/Cracked-Screen-Background-cute.jpg" \
|
||||
LOADURL="data:text/html, <style>html, body{ padding:0;margin:0;background:#000 }</style><img src='${LOADURLIMG}' width='100%' height='100%'>" \
|
||||
CUSTOMPARAMETERS=""
|
||||
|
||||
RUN apt-get update -q && \
|
||||
apt-get install -yqq lib32tinfo5 && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN /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 /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
|
||||
|
||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
||||
|
||||
WORKDIR $BASEDIR
|
||||
|
||||
EXPOSE 27015/udp 27015/tcp
|
||||
EXPOSE 27015/udp
|
||||
|
||||
ENTRYPOINT []
|
||||
CMD [ \
|
||||
"sh", \
|
||||
"-c", \
|
||||
@ -51,14 +47,13 @@ CMD [ \
|
||||
-strictportbind \
|
||||
-port ${PORT} \
|
||||
-tickrate ${TICKRATE} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
-authkey ${AUTHKEY} \
|
||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||
+clientport ${CLIENTPORT} \
|
||||
+gamemode ${GAMEMODE} \
|
||||
+map ${MAP} \
|
||||
+sv_setsteamaccount ${GLST} \
|
||||
+servercfgfile ${CONFIG} \
|
||||
-maxplayers ${MAXPLAYERS} \
|
||||
+sv_loadingurl ${LOADURL} \
|
||||
${CUSTOMPARAMETERS}" \
|
||||
]
|
4
recommended/cfg/sandbox.cfg
Normal file
4
recommended/cfg/sandbox.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - sandbox - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/sandbox/sandbox.txt
|
||||
exec server.cfg
|
||||
exec my.sandbox.cfg
|
@ -1,2 +1,3 @@
|
||||
// Garry's Mod - Config
|
||||
exec ../volume/server.cfg
|
||||
// https://developer.valvesoftware.com/wiki/Console_Command_List
|
||||
exec my.server.cfg
|
4
recommended/cfg/terrortown.cfg
Normal file
4
recommended/cfg/terrortown.cfg
Normal file
@ -0,0 +1,4 @@
|
||||
// Garry's Mod - terrortown - Config
|
||||
// https://github.com/garrynewman/garrysmod/blob/master/garrysmod/gamemodes/terrortown/terrortown.txt
|
||||
exec server.cfg
|
||||
exec my.terrortown.cfg
|
Loading…
Reference in New Issue
Block a user