~ try with lgsm
This commit is contained in:
parent
7a1ccdf67a
commit
e2c5563f68
38
Dockerfile
38
Dockerfile
@ -8,24 +8,46 @@ ENV STEAM_PATH="/home/steam" \
|
|||||||
USER_ID=10000 \
|
USER_ID=10000 \
|
||||||
DOCKER_USER=steam \
|
DOCKER_USER=steam \
|
||||||
\
|
\
|
||||||
DEBIAN_FRONTEND="noninteractive"
|
WORKSHOP_COLLECTION_ID= \
|
||||||
|
INSTALL_CSS=false \
|
||||||
|
INSTALL_HL2=false \
|
||||||
|
INSTALL_HLDM=false \
|
||||||
|
INSTALL_TF2=false \
|
||||||
|
\
|
||||||
|
CSS_PATH="/home/steam/addons/css" \
|
||||||
|
HL2_PATH="/home/steam/addons/hl2" \
|
||||||
|
HLDM_PATH="/home/steam/addons/hldm" \
|
||||||
|
TF2_PATH="/home/steam/addons/tf2" \
|
||||||
|
\
|
||||||
|
USE_MY_REPLACER_CONFIG=false
|
||||||
|
|
||||||
ENTRYPOINT ["./home/entrypoint.sh"]
|
ENTRYPOINT ["./home/entrypoint.sh"]
|
||||||
CMD ["-game", "garrysmod", "+gamemode", "sandbox", "+map", "gm_flatgrass"]
|
|
||||||
|
|
||||||
COPY ["entrypoint.sh", "/home/"]
|
COPY ["entrypoint.sh", "/home/"]
|
||||||
|
|
||||||
# removed dep. lib32gcc1 libtcmalloc-minimal4:i386 gdb libreadline5
|
# removed dep. lib32gcc1 libtcmalloc-minimal4:i386 gdb
|
||||||
RUN dpkg --add-architecture i386 && \
|
RUN dpkg --add-architecture i386 && \
|
||||||
apt-get update -y && \
|
apt-get update -y && \
|
||||||
apt-get install -y mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux lib32gcc1 libstdc++6 libstdc++6:i386 lib32tinfo5 && \
|
apt-get install -y mailutils postfix curl wget file bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux lib32gcc1 libstdc++6 libstdc++6:i386 lib32tinfo5 \
|
||||||
locales \
|
locales && \
|
||||||
\
|
\
|
||||||
|
groupadd -g $GROUP_ID $DOCKER_USER && \
|
||||||
|
useradd -d /home/steam/ -g $GROUP_ID -u $USER_ID -m $DOCKER_USER && \
|
||||||
|
chown "$DOCKER_USER:$DOCKER_USER" /home/entrypoint.sh && \
|
||||||
|
mkdir -p "$SERVER_PATH" && \
|
||||||
|
chown -R "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH" && \
|
||||||
chmod a=rx /home/entrypoint.sh && \
|
chmod a=rx /home/entrypoint.sh && \
|
||||||
|
chmod a=rx /home/installAndMountAddons.sh && \
|
||||||
|
chmod a=rx /home/forceWorkshopDownload.sh && \
|
||||||
|
chmod a=rx /home/experimental.sh && \
|
||||||
|
ulimit -n 2048 && \
|
||||||
\
|
\
|
||||||
locale-gen en_US.UTF-8 && \
|
locale-gen en_US.UTF-8 && \
|
||||||
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh gmodserver
|
\
|
||||||
|
su -u "$DOCKER_USER" wget -O linuxgsm.sh https://linuxgsm.sh && \
|
||||||
|
su -u "$DOCKER_USER" chmod +x linuxgsm.sh && \
|
||||||
|
su -u "$DOCKER_USER" bash linuxgsm.sh gmodserver
|
||||||
|
|
||||||
USER "root:root"
|
USER "$USER_ID:$GROUP_ID"
|
||||||
|
|
||||||
VOLUME "$SERVER_PATH"
|
VOLUME "$SERVER_PATH"
|
||||||
|
@ -3,29 +3,11 @@
|
|||||||
echo "starting entrypoint.sh"
|
echo "starting entrypoint.sh"
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
echo "installing / updating steamcmd in $STEAM_PATH"
|
|
||||||
cd "$STEAM_PATH"
|
|
||||||
wget -q -O - "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar -zxvf -
|
|
||||||
|
|
||||||
echo "testing steamcmd"
|
parms=
|
||||||
./steamcmd.sh -noasync +login anonymous +quit
|
|
||||||
|
|
||||||
echo "installing / validating ttt"
|
./gmodserver install
|
||||||
cd "$STEAM_PATH"
|
|
||||||
./steamcmd.sh -noasync +login anonymous +force_install_dir "$STEAM_PATH/server/" +app_update 4020 validate +quit
|
|
||||||
|
|
||||||
# fix steamcmd error
|
trap './home/steam/gmodserver stop' SIGTERM
|
||||||
ln -s "${STEAM_PATH}/linux32/steamclient.so" ~/.steam/sdk32/steamclient.so
|
./gmodserver debug
|
||||||
|
|
||||||
# todo catch => send killserver / quit
|
|
||||||
cd "$STEAM_PATH/server/"
|
|
||||||
trap 'pkill -15 srcds_run' SIGTERM
|
|
||||||
|
|
||||||
echo "starting with"
|
|
||||||
for var in "$@"
|
|
||||||
do
|
|
||||||
echo "$var"
|
|
||||||
done
|
|
||||||
|
|
||||||
./srcds_run "$@" &
|
|
||||||
wait "$!"
|
wait "$!"
|
||||||
|
Loading…
Reference in New Issue
Block a user