This repository has been archived by the owner on Oct 5, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathDockerfile
81 lines (67 loc) · 2.02 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
###########################################################
# Dockerfile that builds a CSGO Gameserver
###########################################################
FROM cm2network/steamcmd:root as build_stage
LABEL maintainer="[email protected]"
ENV STEAMAPPID 740
ENV STEAMAPP csgo
ENV STEAMAPPDIR "${HOMEDIR}/${STEAMAPP}-dedicated"
ENV DLURL https://raw.githubusercontent.com/CM2Walki/CSGO
COPY etc/entry.sh "${HOMEDIR}/entry.sh"
COPY etc/csgo "/etc/csgo"
RUN set -x \
# Install, update & upgrade packages
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
wget=1.21-1+deb11u1 \
ca-certificates=20210119 \
lib32z1=1:1.2.11.dfsg-2+deb11u2 \
&& mkdir -p "${STEAMAPPDIR}" \
# Add entry script
&& { \
echo '@ShutdownOnFailedCommand 1'; \
echo '@NoPromptForPassword 1'; \
echo 'force_install_dir '"${STEAMAPPDIR}"''; \
echo 'login anonymous'; \
echo 'app_update '"${STEAMAPPID}"''; \
echo 'quit'; \
} > "${HOMEDIR}/${STEAMAPP}_update.txt" \
&& chmod +x "${HOMEDIR}/entry.sh" \
&& chown -R "${USER}:${USER}" "${HOMEDIR}/entry.sh" "${STEAMAPPDIR}" "${HOMEDIR}/${STEAMAPP}_update.txt" \
# Clean up
&& rm -rf /var/lib/apt/lists/*
FROM build_stage AS bullseye-base
ENV SRCDS_FPSMAX=300 \
SRCDS_TICKRATE=128 \
SRCDS_PORT=27015 \
SRCDS_TV_PORT=27020 \
SRCDS_CLIENT_PORT=27005 \
SRCDS_NET_PUBLIC_ADDRESS="0" \
SRCDS_IP="0" \
SRCDS_LAN="0" \
SRCDS_MAXPLAYERS=14 \
SRCDS_TOKEN=0 \
SRCDS_RCONPW="changeme" \
SRCDS_PW="changeme" \
SRCDS_STARTMAP="de_dust2" \
SRCDS_REGION=3 \
SRCDS_MAPGROUP="mg_active" \
SRCDS_GAMETYPE=0 \
SRCDS_GAMEMODE=1 \
SRCDS_HOSTNAME="New \"${STEAMAPP}\" Server" \
SRCDS_WORKSHOP_START_MAP=0 \
SRCDS_HOST_WORKSHOP_COLLECTION=0 \
SRCDS_WORKSHOP_AUTHKEY="" \
ADDITIONAL_ARGS=""
# Switch to user
USER ${USER}
WORKDIR ${HOMEDIR}
CMD ["bash", "entry.sh"]
# Expose ports
EXPOSE 27015/tcp \
27015/udp \
27020/udp
FROM bullseye-base AS bullseye-metamod
ENV METAMOD_VERSION 1.11
FROM bullseye-metamod AS bullseye-sourcemod
ENV SOURCEMOD_VERSION 1.11