-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (32 loc) · 1.37 KB
/
Dockerfile
File metadata and controls
41 lines (32 loc) · 1.37 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
FROM ubuntu:22.04
# Set environment variables
ENV USER steam
ENV HOME /home/${USER}
# Insert Steam prompt answers
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Create a new user with a home directory and bash shell
RUN useradd --home-dir ${HOME} --create-home --shell /bin/bash ${USER} \
&& echo steam steam/question select "I AGREE" | debconf-set-selections \
&& echo steam steam/license note '' | debconf-set-selections
# Set working directory
WORKDIR ${HOME}
# Update the repository and install SteamCMD
ARG DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 \
&& apt-get update -y \
&& apt-get install -y --no-install-recommends ca-certificates locales steamcmd \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Add unicode support
RUN locale-gen en_US.UTF-8
ENV LANG 'en_US.UTF-8'
ENV LANGUAGE 'en_US:en'
# Create symlink for executable
RUN ln -s /usr/games/steamcmd /usr/bin/steamcmd
# Update SteamCMD and verify latest version
RUN steamcmd +quit
# Fix missing directories and libraries
RUN mkdir -p ${HOME}/.steam \
&& ln -s ${HOME}/.local/share/Steam/steamcmd/linux32 ${HOME}/.steam/sdk32 \
&& ln -s ${HOME}/.local/share/Steam/steamcmd/linux64 ${HOME}/.steam/sdk64 \
&& ln -s ${HOME}/.steam/sdk32/steamclient.so ${HOME}/.steam/sdk32/steamservice.so \
&& ln -s ${HOME}/.steam/sdk64/steamclient.so ${HOME}/.steam/sdk64/steamservice.so