-
Notifications
You must be signed in to change notification settings - Fork 6
/
Dockerfile
50 lines (40 loc) · 1.26 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
FROM debian:buster-slim
# Install necessary linux packages
RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
git \
git-lfs \
wget \
ca-certificates \
lib32gcc1
# Steam user variables
ENV UID 1000
ENV USER steam
ENV HOME /home/$USER
# Create the steam user and data directory
RUN adduser --disabled-password --gecos '' -u $UID $USER && \
mkdir -p /data
# Copy all necessary scripts
WORKDIR $HOME
COPY run.sh .
# Set scripts as executable and set ownership of home/data directories
RUN chmod +x run.sh && \
chown -R $USER:$USER /home/$USER && \
chown -R $USER:$USER /data
# Install the SteamCMD as the steam user
USER steam
WORKDIR $HOME
RUN mkdir -p steamcmd && cd steamcmd && \
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz && \
tar -xvzf steamcmd_linux.tar.gz && \
rm steamcmd_linux.tar.gz
# Install the Steam SDK
WORKDIR $HOME/steamcmd
RUN ./steamcmd.sh +force_install_dir . +login anonymous +app_update 1007 +quit
# Link 64-bit binaries (this may not even be necessary?)
RUN mkdir -p $HOME/.steam/sdk64 && \
ln -s $HOME/steamcmd/linux64/steamclient.so $HOME/.steam/sdk64/
WORKDIR $HOME
EXPOSE 7777 27016
ENTRYPOINT ["/bin/bash"]
CMD ["./run.sh"]