prophunt-garrysmod/Dockerfile

61 lines
1.8 KiB
Docker
Raw Normal View History

2018-09-25 11:01:59 +02:00
FROM ubuntu:16.04
2018-09-23 10:13:38 +02:00
EXPOSE 27015/udp 27015/tcp
ENV STEAM_PATH="/home/steam" \
2018-09-25 16:18:01 +02:00
SERVER_PATH="/home/steam/serverfiles" \
2018-09-25 20:15:40 +02:00
STEAM_CMD="/home/steam/steamcmd" \
2018-09-23 10:13:38 +02:00
GROUP_ID=10000 \
USER_ID=10000 \
2018-09-25 12:09:10 +02:00
DOCKER_USER=steam \
\
2018-09-25 12:25:21 +02:00
WORKSHOP_COLLECTION_ID= \
SERVER_NAME="" \
SERVER_PASSWORD="" \
SERVER_VOICE_ENABLE="1" \
\
2018-09-25 12:25:21 +02:00
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" \
\
2018-09-25 16:18:01 +02:00
USE_MY_REPLACER_CONFIG=false \
DEBIAN_FRONTEND=noninteractive
2018-09-23 10:13:38 +02:00
ENTRYPOINT ["./home/entrypoint.sh"]
2018-09-25 20:15:40 +02:00
COPY ["entrypoint.sh", "experimental.sh", "forceWorkshopDownload.sh", "installAndMountAddons.sh", "/home/"]
2018-09-23 10:13:38 +02:00
2018-09-25 12:25:21 +02:00
# removed dep. lib32gcc1 libtcmalloc-minimal4:i386 gdb
2018-09-23 10:13:38 +02:00
RUN dpkg --add-architecture i386 && \
2018-09-25 12:09:10 +02:00
apt-get update -y && \
2018-09-28 14:56:41 +02:00
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 sudo && \
2018-09-25 12:09:10 +02:00
\
2018-09-25 12:25:21 +02:00
groupadd -g $GROUP_ID $DOCKER_USER && \
2018-09-25 16:18:01 +02:00
useradd -d "$STEAM_PATH" -g $GROUP_ID -u $USER_ID -m $DOCKER_USER && \
2018-09-25 12:25:21 +02:00
chown "$DOCKER_USER:$DOCKER_USER" /home/entrypoint.sh && \
2018-09-25 16:18:01 +02:00
sudo -u "$DOCKER_USER" mkdir -p "$SERVER_PATH" && \
2018-09-25 12:25:21 +02:00
chown -R "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH" && \
2018-09-23 10:13:38 +02:00
chmod a=rx /home/entrypoint.sh && \
2018-09-25 20:15:40 +02:00
chmod a=rx /home/experimental.sh && \
chmod a=rx /home/forceWorkshopDownload.sh && \
chmod a=rx /home/installAndMountAddons.sh && \
2018-09-23 10:13:38 +02:00
\
2018-09-25 16:18:01 +02:00
ulimit -n 2048 && \
2018-09-25 12:09:10 +02:00
locale-gen en_US.UTF-8 && \
2018-09-25 12:25:21 +02:00
\
2018-09-25 16:18:01 +02:00
wget -O "$STEAM_PATH/linuxgsm.sh" "https://linuxgsm.sh" && \
chown "$DOCKER_USER:$DOCKER_USER" "$STEAM_PATH/linuxgsm.sh" && \
chmod +x "$STEAM_PATH/linuxgsm.sh"
2018-09-25 12:25:21 +02:00
USER "$USER_ID:$GROUP_ID"
2018-09-23 10:13:38 +02:00
2018-09-25 12:25:21 +02:00
VOLUME "$SERVER_PATH"