56 lines
2 KiB
Text
56 lines
2 KiB
Text
|
# based on 'CM2Walki/steamcmd'
|
||
|
# modified for a more familiar/up-to-date base (fedora+test run)
|
||
|
|
||
|
FROM fedora:35
|
||
|
LABEL maintainer="me@jlay.io" \
|
||
|
org.opencontainers.image.authors="me@jlay.io"
|
||
|
ARG PUID=1000
|
||
|
|
||
|
ENV USER steam
|
||
|
ENV HOMEDIR "/home/${USER}"
|
||
|
ENV STEAMCMDDIR "${HOMEDIR}/steamcmd"
|
||
|
|
||
|
# Install, update & upgrade packages
|
||
|
# Create user for the server
|
||
|
# This also creates the home directory we later need
|
||
|
# Clean TMP, dnf cache and other stuff to make the image smaller
|
||
|
# Create Directory for SteamCMD
|
||
|
# Download SteamCMD
|
||
|
# Extract and delete archive
|
||
|
# Run steamcmd once to test things out/let it update
|
||
|
#
|
||
|
# NOTE: steamcmd doesn't appreciate the 'upstream' LANG:
|
||
|
# WARNING: setlocale('en_US.UTF-8') failed, using locale: 'C'. International characters may not work.
|
||
|
# may drop this.
|
||
|
RUN set -x \
|
||
|
&& sed -i -e 's/^LANG=".*"$/LANG="en_US.UTF-8"/' /etc/locale.conf \
|
||
|
&& echo -e 'max_parallel_downloads=20\nfastestmirror=False\ndeltarpm=False\n' | tee -a /etc/dnf/dnf.conf \
|
||
|
&& dnf install -y \
|
||
|
util-linux \
|
||
|
findutils \
|
||
|
wget \
|
||
|
ca-certificates \
|
||
|
vim \
|
||
|
SDL2.{x86_64,i686} \
|
||
|
less \
|
||
|
curl \
|
||
|
libstdc++.{x86_64,i686} \
|
||
|
libgcc.{x86_64,i686} \
|
||
|
glibc.{x86_64,i686} \
|
||
|
&& useradd -u "${PUID}" -m "${USER}" \
|
||
|
&& su "${USER}" -c \
|
||
|
"mkdir -p \"${STEAMCMDDIR}\" \
|
||
|
&& wget -qO- 'https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz' | tar xvzf - -C \"${STEAMCMDDIR}\" \
|
||
|
&& \"./${STEAMCMDDIR}/steamcmd.sh\" +quit \
|
||
|
&& mkdir -p \"${HOMEDIR}/.steam/sdk32\" \
|
||
|
&& ln -s \"${STEAMCMDDIR}/linux32/steamclient.so\" \"${HOMEDIR}/.steam/sdk32/steamclient.so\" \
|
||
|
&& ln -s \"${STEAMCMDDIR}/linux32/steamcmd\" \"${STEAMCMDDIR}/linux32/steam\" \
|
||
|
&& ln -s \"${STEAMCMDDIR}/steamcmd.sh\" \"${STEAMCMDDIR}/steam.sh\"" \
|
||
|
&& ln -s "${STEAMCMDDIR}/linux64/steamclient.so" "/usr/lib64/steamclient.so" \
|
||
|
&& dnf clean all \
|
||
|
&& ${STEAMCMDDIR}/steamcmd.sh +quit
|
||
|
|
||
|
WORKDIR ${STEAMCMDDIR}
|
||
|
|
||
|
VOLUME ${STEAMCMDDIR}
|