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
|
FROM hackebein/steamcmd:latest
|
||||||
|
|
||||||
ARG BASEDIR=/opt/garrysmod
|
ARG BASEDIR=/opt/garrysmod
|
||||||
|
ONBUILD ARG BASEDIR=$BASEDIR
|
||||||
|
|
||||||
ENV BASEDIR=$BASEDIR \
|
ENV BASEDIR=$BASEDIR \
|
||||||
PORT="27015" \
|
PORT="27015" \
|
||||||
TICKRATE="66" \
|
TICKRATE="66" \
|
||||||
WORKSHOPCOLLECTIONID="" \
|
MAXPLAYERS="16" \
|
||||||
#http://steamcommunity.com/dev/apikey
|
#http://steamcommunity.com/dev/apikey
|
||||||
AUTHKEY="" \
|
AUTHKEY="" \
|
||||||
|
WORKSHOPCOLLECTIONID="" \
|
||||||
CLIENTPORT="27005" \
|
CLIENTPORT="27005" \
|
||||||
|
# sandbox or terrortown
|
||||||
GAMEMODE="sandbox" \
|
GAMEMODE="sandbox" \
|
||||||
MAP="gm_flatgrass" \
|
MAP="gm_flatgrass" \
|
||||||
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
||||||
GLST="" \
|
GLST="" \
|
||||||
CONFIG="server.cfg" \
|
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=""
|
CUSTOMPARAMETERS=""
|
||||||
|
|
||||||
RUN apt-get update -q && \
|
RUN apt-get update -q && \
|
||||||
apt-get install -yqq lib32tinfo5 && \
|
apt-get install -yqq lib32tinfo5 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||||
|
/usr/games/steamcmd \
|
||||||
RUN /usr/games/steamcmd \
|
+login anonymous \
|
||||||
+login anonymous \
|
+force_install_dir $BASEDIR \
|
||||||
+force_install_dir $BASEDIR \
|
# cstrike
|
||||||
# cstrike
|
+app_update 232330 -validate -language en \
|
||||||
+app_update 232330 -validate -language en \
|
# garrysmod
|
||||||
# garrysmod
|
+app_update 4020 -validate -language en \
|
||||||
+app_update 4020 -validate -language en \
|
+quit && \
|
||||||
+quit && \
|
|
||||||
rm -rf $BASEDIR/garrysmod/cfg/*
|
rm -rf $BASEDIR/garrysmod/cfg/*
|
||||||
|
|
||||||
COPY cfg $BASEDIR/garrysmod/cfg
|
COPY cfg $BASEDIR/garrysmod/cfg
|
||||||
|
|
||||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
|
||||||
|
|
||||||
WORKDIR $BASEDIR
|
WORKDIR $BASEDIR
|
||||||
|
|
||||||
EXPOSE 27015/udp 27015/tcp
|
EXPOSE 27015/udp
|
||||||
|
|
||||||
ENTRYPOINT []
|
|
||||||
CMD [ \
|
CMD [ \
|
||||||
"sh", \
|
"sh", \
|
||||||
"-c", \
|
"-c", \
|
||||||
@ -51,14 +47,13 @@ CMD [ \
|
|||||||
-strictportbind \
|
-strictportbind \
|
||||||
-port ${PORT} \
|
-port ${PORT} \
|
||||||
-tickrate ${TICKRATE} \
|
-tickrate ${TICKRATE} \
|
||||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
-maxplayers ${MAXPLAYERS} \
|
||||||
-authkey ${AUTHKEY} \
|
-authkey ${AUTHKEY} \
|
||||||
|
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||||
+clientport ${CLIENTPORT} \
|
+clientport ${CLIENTPORT} \
|
||||||
+gamemode ${GAMEMODE} \
|
+gamemode ${GAMEMODE} \
|
||||||
+map ${MAP} \
|
+map ${MAP} \
|
||||||
+sv_setsteamaccount ${GLST} \
|
+sv_setsteamaccount ${GLST} \
|
||||||
+servercfgfile ${CONFIG} \
|
+servercfgfile ${CONFIG} \
|
||||||
-maxplayers ${MAXPLAYERS} \
|
|
||||||
+sv_loadingurl ${LOADURL} \
|
|
||||||
${CUSTOMPARAMETERS}" \
|
${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
|
// 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
|
FROM hackebein/steamcmd:latest
|
||||||
|
|
||||||
ARG BASEDIR=/opt/garrysmod
|
ARG BASEDIR=/opt/garrysmod
|
||||||
|
ONBUILD ARG BASEDIR=$BASEDIR
|
||||||
|
|
||||||
ENV BASEDIR=$BASEDIR \
|
ENV BASEDIR=$BASEDIR \
|
||||||
PORT="27015" \
|
PORT="27015" \
|
||||||
TICKRATE="66" \
|
TICKRATE="66" \
|
||||||
WORKSHOPCOLLECTIONID="" \
|
MAXPLAYERS="16" \
|
||||||
#http://steamcommunity.com/dev/apikey
|
#http://steamcommunity.com/dev/apikey
|
||||||
AUTHKEY="" \
|
AUTHKEY="" \
|
||||||
|
WORKSHOPCOLLECTIONID="" \
|
||||||
CLIENTPORT="27005" \
|
CLIENTPORT="27005" \
|
||||||
|
# sandbox or terrortown
|
||||||
GAMEMODE="sandbox" \
|
GAMEMODE="sandbox" \
|
||||||
MAP="gm_flatgrass" \
|
MAP="gm_flatgrass" \
|
||||||
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
||||||
GLST="" \
|
GLST="" \
|
||||||
CONFIG="server.cfg" \
|
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=""
|
CUSTOMPARAMETERS=""
|
||||||
|
|
||||||
RUN apt-get update -q && \
|
RUN apt-get update -q && \
|
||||||
apt-get install -yqq lib32tinfo5 && \
|
apt-get install -yqq lib32tinfo5 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||||
|
/usr/games/steamcmd \
|
||||||
RUN /usr/games/steamcmd \
|
+login anonymous \
|
||||||
+login anonymous \
|
+force_install_dir $BASEDIR \
|
||||||
+force_install_dir $BASEDIR \
|
# garrysmod
|
||||||
# garrysmod
|
+app_update 4020 -validate -language en \
|
||||||
+app_update 4020 -validate -language en \
|
+quit && \
|
||||||
+quit && \
|
|
||||||
rm -rf $BASEDIR/garrysmod/cfg/*
|
rm -rf $BASEDIR/garrysmod/cfg/*
|
||||||
|
|
||||||
COPY cfg $BASEDIR/garrysmod/cfg
|
COPY cfg $BASEDIR/garrysmod/cfg
|
||||||
|
|
||||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
|
||||||
|
|
||||||
WORKDIR $BASEDIR
|
WORKDIR $BASEDIR
|
||||||
|
|
||||||
EXPOSE 27015/udp 27015/tcp
|
EXPOSE 27015/udp
|
||||||
|
|
||||||
ENTRYPOINT []
|
|
||||||
CMD [ \
|
CMD [ \
|
||||||
"sh", \
|
"sh", \
|
||||||
"-c", \
|
"-c", \
|
||||||
@ -49,14 +45,13 @@ CMD [ \
|
|||||||
-strictportbind \
|
-strictportbind \
|
||||||
-port ${PORT} \
|
-port ${PORT} \
|
||||||
-tickrate ${TICKRATE} \
|
-tickrate ${TICKRATE} \
|
||||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
-maxplayers ${MAXPLAYERS} \
|
||||||
-authkey ${AUTHKEY} \
|
-authkey ${AUTHKEY} \
|
||||||
|
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||||
+clientport ${CLIENTPORT} \
|
+clientport ${CLIENTPORT} \
|
||||||
+gamemode ${GAMEMODE} \
|
+gamemode ${GAMEMODE} \
|
||||||
+map ${MAP} \
|
+map ${MAP} \
|
||||||
+sv_setsteamaccount ${GLST} \
|
+sv_setsteamaccount ${GLST} \
|
||||||
+servercfgfile ${CONFIG} \
|
+servercfgfile ${CONFIG} \
|
||||||
-maxplayers ${MAXPLAYERS} \
|
|
||||||
+sv_loadingurl ${LOADURL} \
|
|
||||||
${CUSTOMPARAMETERS}" \
|
${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
|
// 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
|
FROM hackebein/steamcmd:latest
|
||||||
|
|
||||||
ARG BASEDIR=/opt/garrysmod
|
ARG BASEDIR=/opt/garrysmod
|
||||||
|
ONBUILD ARG BASEDIR=$BASEDIR
|
||||||
|
|
||||||
ENV BASEDIR=$BASEDIR \
|
ENV BASEDIR=$BASEDIR \
|
||||||
PORT="27015" \
|
PORT="27015" \
|
||||||
TICKRATE="66" \
|
TICKRATE="66" \
|
||||||
WORKSHOPCOLLECTIONID="" \
|
MAXPLAYERS="16" \
|
||||||
#http://steamcommunity.com/dev/apikey
|
#http://steamcommunity.com/dev/apikey
|
||||||
AUTHKEY="" \
|
AUTHKEY="" \
|
||||||
|
WORKSHOPCOLLECTIONID="" \
|
||||||
CLIENTPORT="27005" \
|
CLIENTPORT="27005" \
|
||||||
|
# sandbox or terrortown
|
||||||
GAMEMODE="sandbox" \
|
GAMEMODE="sandbox" \
|
||||||
MAP="gm_flatgrass" \
|
MAP="gm_flatgrass" \
|
||||||
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
#http://steamcommunity.com/dev/managegameservers APPID: 4000
|
||||||
GLST="" \
|
GLST="" \
|
||||||
CONFIG="server.cfg" \
|
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=""
|
CUSTOMPARAMETERS=""
|
||||||
|
|
||||||
RUN apt-get update -q && \
|
RUN apt-get update -q && \
|
||||||
apt-get install -yqq lib32tinfo5 && \
|
apt-get install -yqq lib32tinfo5 && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
|
||||||
|
/usr/games/steamcmd \
|
||||||
RUN /usr/games/steamcmd \
|
+login anonymous \
|
||||||
+login anonymous \
|
+force_install_dir $BASEDIR \
|
||||||
+force_install_dir $BASEDIR \
|
# cstrike
|
||||||
# cstrike
|
+app_update 232330 -validate -language en \
|
||||||
+app_update 232330 -validate -language en \
|
# garrysmod
|
||||||
# garrysmod
|
+app_update 4020 -validate -language en \
|
||||||
+app_update 4020 -validate -language en \
|
+quit && \
|
||||||
+quit && \
|
|
||||||
rm -rf $BASEDIR/garrysmod/cfg/*
|
rm -rf $BASEDIR/garrysmod/cfg/*
|
||||||
|
|
||||||
COPY cfg $BASEDIR/garrysmod/cfg
|
COPY cfg $BASEDIR/garrysmod/cfg
|
||||||
|
|
||||||
VOLUME [ "$BASEDIR/garrysmod/volume" ]
|
|
||||||
|
|
||||||
WORKDIR $BASEDIR
|
WORKDIR $BASEDIR
|
||||||
|
|
||||||
EXPOSE 27015/udp 27015/tcp
|
EXPOSE 27015/udp
|
||||||
|
|
||||||
ENTRYPOINT []
|
|
||||||
CMD [ \
|
CMD [ \
|
||||||
"sh", \
|
"sh", \
|
||||||
"-c", \
|
"-c", \
|
||||||
@ -51,14 +47,13 @@ CMD [ \
|
|||||||
-strictportbind \
|
-strictportbind \
|
||||||
-port ${PORT} \
|
-port ${PORT} \
|
||||||
-tickrate ${TICKRATE} \
|
-tickrate ${TICKRATE} \
|
||||||
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
-maxplayers ${MAXPLAYERS} \
|
||||||
-authkey ${AUTHKEY} \
|
-authkey ${AUTHKEY} \
|
||||||
|
+host_workshop_collection ${WORKSHOPCOLLECTIONID} \
|
||||||
+clientport ${CLIENTPORT} \
|
+clientport ${CLIENTPORT} \
|
||||||
+gamemode ${GAMEMODE} \
|
+gamemode ${GAMEMODE} \
|
||||||
+map ${MAP} \
|
+map ${MAP} \
|
||||||
+sv_setsteamaccount ${GLST} \
|
+sv_setsteamaccount ${GLST} \
|
||||||
+servercfgfile ${CONFIG} \
|
+servercfgfile ${CONFIG} \
|
||||||
-maxplayers ${MAXPLAYERS} \
|
|
||||||
+sv_loadingurl ${LOADURL} \
|
|
||||||
${CUSTOMPARAMETERS}" \
|
${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
|
// 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