This repository was archived by the owner on Feb 22, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (58 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
70 lines (58 loc) · 1.75 KB
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
## Pull our base image
FROM debian:12-slim
## Image Information
LABEL maintainer="Jeff Nelson <jeff@netwar.org>"
ARG DEBIAN_FRONTEND=noninteractive
## Set Build Arguments
ENV APP_DIR="/app" \
GAME_DIR="/app/csgo" \
GAME_USER="steam" \
STEAMCMD_APP="740" \
STEAMCMD_USER="anonymous" \
STEAMCMD_PASSWORD="" \
STEAMCMD_AUTH_CODE="" \
STEAMCMD_DIR="/app/steamcmd"
## Start building our server
RUN dpkg --add-architecture i386 \
&& apt update \
&& apt install -y \
curl \
lib32gcc-s1 \
lib32ncurses5-dev \
lib32stdc++6 \
lib32z1 \
libtinfo5 \
libc6 \
zlib1g \
libsdl2-2.0-0 \
libcurl3-gnutls:i386 \
wget \
unzip \
net-tools\
&& apt clean \
&& rm -rf /var/tmp/* /var/lib/apt/lists/* /tmp/* \
## Create Directory Structure
&& mkdir -p $GAME_DIR \
&& mkdir -p $STEAMCMD_DIR \
## Create our User
&& useradd -ms /bin/bash $GAME_USER \
## Set Directory Permissions
&& chown -R $GAME_USER:$GAME_USER $GAME_DIR \
&& chown -R $GAME_USER:$GAME_USER $STEAMCMD_DIR
## Change to our User
USER $GAME_USER
## Download SteamCMD
RUN curl -s http://media.steampowered.com/installer/steamcmd_linux.tar.gz | tar -xzC $STEAMCMD_DIR \
&& $STEAMCMD_DIR/steamcmd.sh \
+login $STEAMCMD_USER $STEAMCMD_PASSWORD $STEAMCMD_AUTH_CODE \
+quit \
## Create symlinks and appid for Steam
&& mkdir -p ~/.steam/sdk32 \
&& ln -s $STEAMCMD_DIR/linux32/steamclient.so ~/.steam/sdk32/steamclient.so \
&& echo "$STEAMCMD_APP" > $GAME_DIR/steam_appid.txt
## Copy our run script into the image
COPY run.sh $APP_DIR/run.sh
## Set working directory
WORKDIR $APP_DIR
## Start the run script
CMD ["bash", "run.sh"]