forked from mvlm/counter-strike-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
54 lines (42 loc) · 1.97 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:stretch-slim
LABEL maintainer "Vladislav Mozgovoy <[email protected]>"
ARG steam_user="anonymous"
ARG steam_password=""
ARG metamod_version="1.21.1-am"
ARG amxmod_version="1.8.2"
RUN apt update && apt install -y \
lib32gcc1 \
curl \
lib32stdc++6 \
unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install SteamCMD
RUN mkdir -p /opt/steam && cd /opt/steam \
&& curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
# Install HLDS
RUN mkdir -p /opt/hlds \
# Workaround for "app_update 90" bug, see https://forums.alliedmods.net/showthread.php?p=2518786
&& /opt/steam/steamcmd.sh +login $steam_user $steam_password +force_install_dir /opt/hlds +app_update 90 validate +quit \
&& /opt/steam/steamcmd.sh +login $steam_user $steam_password +force_install_dir /opt/hlds +app_update 70 validate +quit || : \
&& /opt/steam/steamcmd.sh +login $steam_user $steam_password +force_install_dir /opt/hlds +app_update 10 validate +quit || : \
&& /opt/steam/steamcmd.sh +login $steam_user $steam_password +force_install_dir /opt/hlds +app_update 90 validate +quit \
&& mkdir -p ~/.steam \
&& ln -s /opt/hlds ~/.steam/sdk32 \
&& ln -s /opt/steam/ /opt/hlds/steamcmd
# Install metamod
RUN mkdir -p /opt/hlds/cstrike/addons/metamod/dlls \
&& curl -O http://www.amxmodx.org/release/metamod-$metamod_version.zip \
&& unzip -d /opt/hlds/cstrike metamod-$metamod_version.zip \
&& rm -f metamod-$metamod_version.zip
# Install AMX mod X
RUN curl -sqL "http://www.amxmodx.org/release/amxmodx-$amxmod_version-base-linux.tar.gz" | tar -C /opt/hlds/cstrike/ -zxvf - \
&& curl -sqL "http://www.amxmodx.org/release/amxmodx-$amxmod_version-cstrike-linux.tar.gz" | tar -C /opt/hlds/cstrike/ -zxvf -
# Cleanup
RUN apt remove -y curl unzip
# Add files
ADD hlds /opt/hlds
ADD hlds_run.sh /bin/hlds_run.sh
ENV LD_LIBRARY_PATH=/opt/hlds
WORKDIR /opt/hlds
ENTRYPOINT ["/bin/hlds_run.sh"]