Skip to content

Commit

Permalink
Switch to steamcmd/steamcmd:ubuntu-24 (#334)
Browse files Browse the repository at this point in the history
* Switch to steamcmd/steamcmd:ubuntu-24

Solve for UID & GID 1000 already in use by removing ubuntu user & group.

Create steam group and user with PGID and PUID from ENV vars, default 1000.

Also adds tzdata package to insure Docker TZ environment variable functions.

---------

Co-authored-by: Robert Thomas <31854736+wolveix@users.noreply.github.com>
  • Loading branch information
goofball222 and wolveix authored Dec 4, 2024
1 parent d324224 commit ffeac26
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
FROM steamcmd/steamcmd:ubuntu-22
FROM steamcmd/steamcmd:ubuntu-24

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" \
PGID="1000" \
PUID="1000" \
ROOTLESS="false" \
SERVERGAMEPORT="7777" \
SERVERSTREAMING="true" \
SKIPUPDATE="false" \
STEAMAPPID="1690800" \
STEAMBETA="false" \
TIMEOUT="30" \
VMOVERRIDE="false"

# hadolint ignore=DL3008
RUN set -x \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y gosu xdg-user-dirs curl jq tzdata --no-install-recommends \
&& apt-get install -y gosu xdg-user-dirs curl jq tzdata --no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& useradd -ms /bin/bash steam \
&& userdel ubuntu \
&& groupadd -r steam -g $PGID \
&& useradd -ms /bin/bash --no-log-init -r -u $PUID -g $PGID steam \
&& gosu nobody true

RUN mkdir -p /config \
Expand All @@ -23,28 +46,8 @@ ARG VERSION="DEV"
ENV VERSION=$VERSION
LABEL version=$VERSION

ENV AUTOSAVENUM="5" \
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" \
PGID="1000" \
PUID="1000" \
ROOTLESS="false" \
SERVERGAMEPORT="7777" \
SERVERSTREAMING="true" \
SKIPUPDATE="false" \
STEAMAPPID="1690800" \
STEAMBETA="false" \
TIMEOUT="30" \
VMOVERRIDE="false"

STOPSIGNAL SIGINT

EXPOSE 7777/udp 7777/tcp

ENTRYPOINT [ "/init.sh" ]
ENTRYPOINT [ "/init.sh" ]

0 comments on commit ffeac26

Please sign in to comment.