2021-11-17 00:27:39 +00:00
|
|
|
# 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"
|
|
|
|
|
2021-11-20 01:29:49 +00:00
|
|
|
# site customizations below, change as necessary (eg: to match Docker volume host UID/GID owners)
|
|
|
|
ARG PUID=1001
|
|
|
|
ARG PGID=1002
|
|
|
|
|
|
|
|
# set the user, homedir, and steamcmd directories as (env) variables
|
2021-11-17 00:27:39 +00:00
|
|
|
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 \
|
|
|
|
less \
|
|
|
|
curl \
|
|
|
|
libstdc++.{x86_64,i686} \
|
|
|
|
libgcc.{x86_64,i686} \
|
|
|
|
glibc.{x86_64,i686} \
|
2021-11-17 01:30:33 +00:00
|
|
|
SDL2.{x86_64,i686} \
|
2021-11-17 01:32:10 +00:00
|
|
|
&& dnf -y up \
|
2021-11-17 01:30:33 +00:00
|
|
|
&& dnf clean all \
|
2021-11-17 00:27:39 +00:00
|
|
|
&& 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\"" \
|
2021-11-17 01:30:33 +00:00
|
|
|
&& echo -e "#\!/bin/bash\npushd ${STEAMCMDDIR}\n./steamcmd.sh\npopd" | tee -a /usr/local/bin/steamcmd \
|
|
|
|
&& chmod -v +x /usr/local/bin/steamcmd \
|
2021-11-17 00:27:39 +00:00
|
|
|
&& ln -s "${STEAMCMDDIR}/linux64/steamclient.so" "/usr/lib64/steamclient.so" \
|
|
|
|
&& ${STEAMCMDDIR}/steamcmd.sh +quit
|
|
|
|
|
|
|
|
WORKDIR ${STEAMCMDDIR}
|
|
|
|
|
|
|
|
VOLUME ${STEAMCMDDIR}
|