Merge pull request #1 from brcaswell/docker-desktop-2.2.0.3-patch

PR docker-desktop-2.2.0.3-patch to master
This commit is contained in:
Jiriki 2020-03-07 17:36:15 +00:00 committed by GitHub
commit 9545566528
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 76 additions and 51 deletions

View file

@ -1,17 +1,27 @@
FROM ubuntu
FROM ubuntu AS Ubuntu_SteamCMD
# Get Package Dependencies, Accept ToS with Steam Dependency, clear appt cache
RUN dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install wget lib32gcc1 lib32stdc++6 libcurl3:i386 unzip liblz4-tool gcc-multilib g++-multilib
# Accept ToS
RUN printf "\n2\n"|apt-get install -y steamcmd
apt-get -y install wget \
lib32gcc1 \
lib32stdc++6 \
libstdc++6:i386 \
libcurl3:i386 \
unzip \
liblz4-tool \
gcc-multilib \
g++-multilib && \
printf "\n2\n"|apt-get install -y steamcmd && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m steam
USER steam
WORKDIR /home/steam
FROM Ubuntu_SteamCMD AS SteamCMD_HLDS
RUN mkdir -p /home/steam/hlds/steamapps/
# Run app validate several times workaround HLDS bug
@ -21,55 +31,54 @@ RUN /usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +ap
COPY --chown=steam files/*.acf /home/steam/hlds/steamapps/
# HLDS bug workaround. Geez.
RUN printf "quit\nquit\n"|/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true
RUN printf "quit\nquit\n"|/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true
RUN printf "quit\nquit\nquit\nquit\nquit\n" |/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true
RUN printf "quit\nquit\n"|/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true && \
printf "quit\nquit\n"|/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true && \
printf "quit\nquit\nquit\nquit\nquit\n" |/usr/games/steamcmd +login anonymous +force_install_dir /home/steam/hlds +app_set_config 90 mod valve +app_update 90 validate ||true
# HLDS bug workaround. Yay.
RUN mkdir -p ~/.steam/sdk32 && ln -s ~/.steam/steamcmd/linux32/steamclient.so ~/.steam/sdk32/steamclient.so
COPY scripts/*.sh /home/steam/hlds/
FROM SteamCMD_HLDS AS HLDS_NS
WORKDIR /home/steam/hlds
COPY --chown=steam files/ns.sha /home/steam/hlds
# NS bug workaround. Since NS links to a GCC which is not included in the steam-provided libstdc++:i386
RUN mv libstdc++* /home/steam/
RUN mv /home/steam/hlds/libstdc++* /home/steam/ && \
# Install NS
wget 'https://github.com/ENSL/NS/releases/download/v3.2.2/ns_v322_full.zip' && \
unzip ns_v322_full.zip && \
cp /home/steam/hlds/ns/liblist.gam /home/steam/hlds/ns/liblist.bak
# Install NS
RUN wget 'https://github.com/ENSL/NS/releases/download/v3.2.2/ns_v322_full.zip'
COPY --chown=steam files/ns.sha /home/steam/hlds
# RUN sha256sum -c ns.sha
RUN unzip ns_v322_full.zip
FROM HLDS_NS AS HLDS_ENSL
WORKDIR /home/steam/hlds/ns
# NS workarounds
RUN echo 70 > steam_appid.txt
# RUN mv dlls/ns_i386.so dlls/ns.so || echo
# ENSL package
RUN cp liblist.gam liblist.bak
# RUN wget https://github.com/ENSL/ensl-plugin/releases/download/v1.4/ensl_srvpkg-v1.4.zip -O srv.zip
RUN wget https://github.com/ENSL/ensl-plugin/releases/download/1.4-extra/ENSL_SrvPkg-1.4-extra.zip -O srv.zip
RUN unzip -o srv.zip
# Use seperate server.cfg because autoexec.cfg is unreliable
RUN touch /home/steam/hlds/ns/server.cfg
RUN wget https://github.com/ENSL/ensl-plugin/releases/download/1.4-extra/ENSL_SrvPkg-1.4-extra.zip -O srv.zip && \
unzip -o srv.zip && \
# Use seperate server.cfg because autoexec.cfg is unreliable
touch /home/steam/hlds/ns/server.cfg
# Copy own configs including bans
ADD overlay /home/steam/hlds/ns/
COPY scripts/*.sh /home/steam/hlds/
USER root
RUN chown -R steam /home/steam/hlds
RUN apt-get install -y libstdc++6:i386
USER steam
#USER root
#RUN chown -R steam /home/steam/hlds
#USER steam
WORKDIR /home/steam/hlds
# VAC, HLDS, RCON, HLTV
EXPOSE 26900
EXPOSE 27016/udp
EXPOSE 27016
EXPOSE 27020
# VAC Service
EXPOSE 26900 \
# HLDS
27016 \
# HLDS RCON
27016/udp \
# HLTV
27020
# ENTRYPOINT ["/bin/bash"]
ENTRYPOINT ["/home/steam/hlds/entry.sh"]

View file

@ -1,25 +1,39 @@
version: "2"
version: "3.0"
services:
hlds:
image: ensl/ensl_hlds:latest
volumes:
- "./logs:/home/steam/hlds/ns/logs"
network_mode: "host"
- "./logs:/home/steam/hlds/ns/logs"
network_mode: "ensl_hlds_default"
ports:
- 26900:26900
- 27016:27016/udp
- 27016:27016
environment:
- HLDS=1
- HLDS=1
hltv:
image: ensl/ensl_hlds:latest
volumes:
- "./demos:/home/steam/hlds/ns/demos"
network_mode: "host"
- "./demos:/home/steam/hlds/ns/demos"
network_mode: "ensl_hlds_default"
depends_on:
- hlds
ports:
- 27020:27020
environment:
- HLTV=1
- HLTV=1
cleaner:
image: ensl/ensl_hlds:latest
volumes:
- "./demos:/home/steam/hlds/ns/demos"
- "./logs:/home/steam/hlds/ns/logs"
- "./demos:/home/steam/hlds/ns/demos"
- "./logs:/home/steam/hlds/ns/logs"
network_mode: "ensl_hlds_default"
depends_on:
- hlds
- hltv
environment:
- HLDS_ROTATE=1
- HLTV_ROTATE=1
- HLDS_ROTATE=1
- HLTV_ROTATE=1

View file

@ -1 +1 @@
e1f58f3c671b4c4a6735f4a36cb65da88e6bfc5337a3cb837bfa400d73733896 ns_dedicated_server_v32.zip
75561CBE594E5006A8D662DC4C97BB54DA5811FF692692DC6AA1B8EE1212D3E0 ns_v322_full.zip

View file

@ -17,13 +17,15 @@ if [[ "$HLTV_ROTATE" = "1" ]]; then
fi
if [[ "$HLTV" = "1" ]]; then
echo "Starting HLTV"
echo "Starting HLTV localhost:27016"
export LD_LIBRARY_PATH=.
./hltv +serverpassword europe +connect localhost:27015 +record demos/gathers >> /home/steam/hlds/ns/demos/hltv-`date +%F-%h:%m`.log
./hltv +serverpassword europe +connect localhost:27016 +record demos/gathers >> /home/steam/hlds/ns/demos/hltv-`date +%F-%h:%m`.log
echo "Started"
elif [[ "$HLDS" = "1" ]]; then
echo "Starting HLDS"
echo "Starting HLDS -port 27016"
export LD_LIBRARY_PATH=.
./hlds_run -game ns +maxplayers 32 +log on +map ns_veil +exec ns/server.cfg -pingboost 3 +sys_ticrate 1000
./hlds_run -game ns +maxplayers 32 +log on +map ns_veil +exec ns/server.cfg -port 27016 -pingboost 3 +sys_ticrate 1000
echo "Started"
fi
bash