# 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" # 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 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 -qy \ util-linux \ findutils \ wget \ ca-certificates \ vim \ less \ curl \ libstdc++.{x86_64,i686} \ libgcc.{x86_64,i686} \ glibc.{x86_64,i686} \ SDL2.{x86_64,i686} \ && dnf -qy up \ && dnf clean all \ && 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\"" \ && echo -e "#\!/bin/bash\npushd ${STEAMCMDDIR}\n./steamcmd.sh\npopd" | tee -a /usr/local/bin/steamcmd \ && chmod -v +x /usr/local/bin/steamcmd \ && ln -s "${STEAMCMDDIR}/linux64/steamclient.so" "/usr/lib64/steamclient.so" \ && ${STEAMCMDDIR}/steamcmd.sh +quit WORKDIR ${STEAMCMDDIR} VOLUME ${STEAMCMDDIR}