-
-
Notifications
You must be signed in to change notification settings - Fork 155
/
Copy pathDockerfile
54 lines (46 loc) · 1.41 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 steamcmd/steamcmd:ubuntu-22
ARG GID=1000
ARG UID=1000
ENV AUTOSAVENUM="5" \
DEBIAN_FRONTEND="noninteractive" \
DEBUG="false" \
DISABLESEASONALEVENTS="false" \
GAMECONFIGDIR="/config/gamefiles/FactoryGame/Saved" \
GAMESAVESDIR="/home/steam/.config/Epic/FactoryGame/Saved/SaveGames" \
LOG="false" \
MAXOBJECTS="2162688" \
MAXPLAYERS="4" \
MAXTICKRATE="30" \
MULTIHOME="::" \
PGID="1000" \
PUID="1000" \
SERVERGAMEPORT="7777" \
SERVERSTREAMING="true" \
SKIPUPDATE="false" \
STEAMAPPID="1690800" \
STEAMBETA="false" \
TIMEOUT="30" \
VMOVERRIDE="false"
# hadolint ignore=DL3008
RUN set -x \
&& apt-get update \
&& apt-get install -y gosu xdg-user-dirs curl jq tzdata --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -g ${GID} steam \
&& useradd -u ${UID} -g ${GID} -ms /bin/bash steam \
&& mkdir -p /home/steam/.local/share/Steam/ \
&& cp -R /root/.local/share/Steam/steamcmd/ /home/steam/.local/share/Steam/steamcmd/ \
&& chown -R ${UID}:${GID} /home/steam/.local/ \
&& gosu nobody true
RUN mkdir -p /config \
&& chown steam:steam /config
COPY init.sh healthcheck.sh /
COPY --chown=steam:steam run.sh /home/steam/
HEALTHCHECK --timeout=30s --start-period=300s CMD bash /healthcheck.sh
WORKDIR /config
ARG VERSION="DEV"
ENV VERSION=$VERSION
LABEL version=$VERSION
STOPSIGNAL SIGINT
EXPOSE 7777/udp 7777/tcp
ENTRYPOINT [ "/init.sh" ]