From fd361e060a17dcb838741853c09ceedd461ff0d3 Mon Sep 17 00:00:00 2001 From: Son Roy Almerol Date: Sun, 7 Jul 2024 16:04:37 -0400 Subject: [PATCH] remove qemu binaries and update readme --- README.md | 32 +++++++++++++-- bookworm/Dockerfile | 98 +------------------------------------------- box64.sh | 2 + bullseye/Dockerfile | 99 +-------------------------------------------- 4 files changed, 33 insertions(+), 198 deletions(-) diff --git a/README.md b/README.md index 2cfa893..2c63be5 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ [![](https://img.shields.io/codacy/grade/6a8e207cf98246169e633d6f22da9d9c)](https://hub.docker.com/r/sonroyaalmerol/steamcmd-arm64/) [![Docker Pulls](https://img.shields.io/docker/pulls/sonroyaalmerol/steamcmd-arm64.svg)](https://hub.docker.com/r/sonroyaalmerol/steamcmd-arm64/) [![](https://img.shields.io/docker/image-size/sonroyaalmerol/steamcmd-arm64)](https://img.shields.io/docker/image-size/sonroyaalmerol/steamcmd-arm64) [![Bookworm Images](https://github.com/sonroyaalmerol/steamcmd-arm64/actions/workflows/release.yml/badge.svg)](https://github.com/sonroyaalmerol/steamcmd-arm64/actions/workflows/release.yml) [![Bullseye Images](https://github.com/sonroyaalmerol/steamcmd-arm64/actions/workflows/release-bullseye.yml/badge.svg)](https://github.com/sonroyaalmerol/steamcmd-arm64/actions/workflows/release-bullseye.yml) +> [!IMPORTANT] +> QEMU user static binaries has been removed from the image from the 2024-07-07 tag and onwards. See issue [#7](https://github.com/sonroyaalmerol/steamcmd-arm64/issues/7) + # Supported tags and respective `Dockerfile` links - [`steam`, `steam-bookworm`, `latest` (*bookworm/Dockerfile*)](https://github.com/sonroyaalmerol/steamcmd-arm64/blob/master/bookworm/Dockerfile) - [`root`, `root-bookworm` (*bookworm/Dockerfile*)](https://github.com/sonroyaalmerol/steamcmd-arm64/blob/master/bookworm/Dockerfile) @@ -15,8 +18,6 @@ The Steam Console Client or SteamCMD is a command-line version of the Steam clie # What makes this compatible with ARM64? This image has [Box64](https://github.com/ptitSeb/box64) and [Box86](https://github.com/ptitSeb/box86) integrated. By default, SteamCMD will be using Box86 when running via the steamcmd.sh shell script. Box86 is needed as SteamCMD itself a 32-bit binary application. For 64-bit server binaries, please use Box64 `/usr/local/bin/box64`. For tweaking, environment variables could be used for both [Box64](https://github.com/ptitSeb/box64/blob/main/docs/USAGE.md) and [Box86](https://github.com/ptitSeb/box86/blob/master/docs/USAGE.md). -You may also opt to use qemu-i386-static instead of Box86 for better compatibility (but slower performance) by using `/usr/bin/qemu-i386-static` as value for the `DEBUGGER` env variable. - # How to use this image > [!IMPORTANT] > Images are hosted in ghcr.io (ghcr.io/sonroyaalmerol/steamcmd-arm64) and Docker Hub (sonroyaalmerol/steamcmd-arm64). @@ -42,10 +43,35 @@ This setup is necessary if you have to download a non-anonymous appID or upload https://hub.docker.com/r/cm2network/steampipe/ ## Configuration -This image includes the `nano` text editor for convenience. +This image includes the `nano` text editor for convenience. The `steamcmd.sh` can be found in the following directory: `/home/steam/steamcmd` +For better Box64 compatibility, some dedicated servers need specific configurations for stability. The combination listed below might give you the best chance in exchange for performance. You may adjust them as needed. No custom Box64 configurations have been set for this image by default. See [Box64 usage documentation](https://github.com/ptitSeb/box64/blob/main/docs/USAGE.md) for more info. + +``` +# Set these as env variables within the container +export BOX64_DYNAREC_BIGBLOCK=0 +export BOX64_DYNAREC_SAFEFLAGS=2 +export BOX64_DYNAREC_STRONGMEM=3 +export BOX64_DYNAREC_FASTROUND=0 +export BOX64_DYNAREC_FASTNAN=0 +export BOX64_DYNAREC_X87DOUBLE=1 +``` + +## Box64 Builds + +This image currently includes the following Box64 build variants for the following devices: + + - Generic [`generic`] + - Raspberry Pi 5 [`rpi5`] + - M1 (M-Series) Mac [`m1`] + - ADLink Ampere Altra (Oracle ARM CPUs) [`adlink`] + +You may specify which variant to use with the `ARM64_DEVICE` environment variable. `generic` variant will be used by default. + +For more build variants, please create a new issue with your reasoning. + ## Examples Images utilizing this base image: diff --git a/bookworm/Dockerfile b/bookworm/Dockerfile index 7d163f5..4ece717 100644 --- a/bookworm/Dockerfile +++ b/bookworm/Dockerfile @@ -1,99 +1,3 @@ -FROM arm64v8/debian:bookworm-slim as qemu_build - -ENV DEBIAN_FRONTEND noninteractive - -# Set SHELL option explicitly -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# hadolint ignore=DL3008 -RUN set -x \ - # Install, update & upgrade packages - && apt-get update \ - && apt-get install -y --no-install-recommends --no-install-suggests \ - git \ - libglib2.0-dev \ - libfdt-dev \ - libpixman-1-dev \ - zlib1g-dev \ - ninja-build \ - build-essential \ - python3-venv \ - python3-tomli \ - flex \ - bison \ - libaio-dev \ - libattr1-dev \ - libbrlapi-dev \ - libcacard-dev \ - libcap-ng-dev \ - libgcrypt20-dev \ - libgtk-3-dev \ - libiscsi-dev \ - liblttng-ust-dev \ - libncurses5-dev \ - libnfs-dev \ - libpng-dev \ - librados-dev \ - libsdl2-dev \ - libseccomp-dev \ - liburcu-dev \ - libusb-1.0-0-dev \ - libvdeplug-dev \ - libvte-2.91-dev \ - libc-dev-bin \ - libcurl4-openssl-dev \ - multipath-tools \ - liburing-dev \ - librdmacm-dev \ - libbpf-dev \ - librbd-dev \ - pcscd \ - libccid \ - libepoxy-dev \ - libssh-dev \ - liblzo2-dev \ - libsnappy-dev \ - libbz2-dev \ - libzstd-dev \ - libqpdf-dev \ - libnuma-dev \ - libcapstone-dev \ - libpmem-dev \ - libdaxctl-dev \ - libudev-dev \ - fuse \ - libdw-dev \ - libnghttp2-dev \ - librtmp-dev \ - libssh2-1-dev \ - libpsl-dev \ - libkrb5-dev \ - libldap2-dev \ - libp11-kit-dev \ - libunistring-dev \ - && rm -rf /var/lib/apt/lists/* \ - && git clone https://gitlab.com/qemu-project/qemu.git \ - && cd qemu \ - && git checkout master -b stable-9.0 \ - && git submodule update --init --recursive \ - && ./configure \ - --prefix=/build/qemu-user-static \ - --static \ - --disable-system \ - --disable-bsd-user \ - --target-list=i386-linux-user \ - --enable-bzip2 \ - --enable-libssh \ - --enable-nettle \ - --enable-curses \ - --enable-curl \ - --enable-lzo \ - --enable-numa \ - && make -j$(nproc) \ - && make install - -############################################################ - FROM arm64v8/python:slim-bookworm as box64_m1 ENV DEBIAN_FRONTEND noninteractive @@ -187,7 +91,6 @@ ENV DEBUGGER "/usr/local/bin/box86" # Set SHELL option explicitly SHELL ["/bin/bash", "-o", "pipefail", "-c"] -COPY --from=qemu_build /build/qemu-user-static/bin/qemu-i386 /usr/bin/qemu-i386-static COPY --from=box64_m1 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-m1 COPY --from=box64_rpi5 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-rpi5 COPY --from=box64_adlink /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-adlink @@ -242,6 +145,7 @@ RUN set -x \ # Symlink steamclient.so; So misconfigured dedicated servers can find it && mkdir -p /usr/lib/x86_64-linux-gnu \ && ln -s "${STEAMCMDDIR}/linux64/steamclient.so" "/usr/lib/x86_64-linux-gnu/steamclient.so" \ + && ln -s "${STEAMCMDDIR}/linux32/steamclient.so" "/usr/lib/i386-linux-gnu/steamclient.so" \ && rm -rf /var/lib/apt/lists/* \ && mv /usr/local/bin/box64 /usr/local/bin/box64-generic diff --git a/box64.sh b/box64.sh index 1f62168..6b527bb 100644 --- a/box64.sh +++ b/box64.sh @@ -4,6 +4,8 @@ if [[ -z "$ARM64_DEVICE" ]]; then echo "ARM64_DEVICE environment variable is not set, using generic Box64 build." fi +export BOX64_ROLLING_LOG=1 + # Define the path to binaries based on the ARM64_DEVICE environment variable case $ARM64_DEVICE in rpi5) diff --git a/bullseye/Dockerfile b/bullseye/Dockerfile index 7537bbf..3184685 100644 --- a/bullseye/Dockerfile +++ b/bullseye/Dockerfile @@ -1,100 +1,3 @@ -FROM arm64v8/debian:bullseye-slim as qemu_build - -ENV DEBIAN_FRONTEND noninteractive - -# Set SHELL option explicitly -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - -# hadolint ignore=DL3008 -RUN set -x \ - # Install, update & upgrade packages - && echo "deb http://deb.debian.org/debian bullseye-backports main contrib non-free" | tee -a /etc/apt/sources.list \ - && apt-get update \ - && apt-get install -y --no-install-recommends --no-install-suggests \ - git \ - libglib2.0-dev \ - libfdt-dev \ - libpixman-1-dev \ - zlib1g-dev \ - ninja-build \ - build-essential \ - python3-venv \ - python3-tomli \ - flex \ - bison \ - libaio-dev \ - libattr1-dev \ - libbrlapi-dev \ - libcacard-dev \ - libcap-ng-dev \ - libgcrypt20-dev \ - libgtk-3-dev \ - libiscsi-dev \ - liblttng-ust-dev \ - libncurses5-dev \ - libnfs-dev \ - libpng-dev \ - librados-dev \ - libsdl2-dev \ - libseccomp-dev \ - liburcu-dev \ - libusb-1.0-0-dev \ - libvdeplug-dev \ - libvte-2.91-dev \ - libc-dev-bin \ - libcurl4-openssl-dev \ - multipath-tools \ - liburing-dev \ - librdmacm-dev \ - libbpf-dev \ - librbd-dev \ - pcscd \ - libccid \ - libepoxy-dev \ - libssh-dev \ - liblzo2-dev \ - libsnappy-dev \ - libbz2-dev \ - libzstd-dev \ - libqpdf-dev \ - libnuma-dev \ - libcapstone-dev \ - libpmem-dev \ - libdaxctl-dev \ - libudev-dev \ - fuse \ - libdw-dev \ - libnghttp2-dev \ - librtmp-dev \ - libssh2-1-dev \ - libpsl-dev \ - libkrb5-dev \ - libldap2-dev \ - libp11-kit-dev \ - libunistring-dev \ - && rm -rf /var/lib/apt/lists/* \ - && git clone https://gitlab.com/qemu-project/qemu.git \ - && cd qemu \ - && git checkout master -b stable-9.0 \ - && git submodule update --init --recursive \ - && ./configure \ - --prefix=/build/qemu-user-static \ - --static \ - --disable-system \ - --disable-bsd-user \ - --target-list=i386-linux-user \ - --enable-bzip2 \ - --enable-libssh \ - --enable-nettle \ - --enable-curses \ - --enable-curl \ - --enable-lzo \ - --enable-numa \ - && make -j$(nproc) \ - && make install - -############################################################ - FROM arm64v8/python:slim-bullseye as box64_m1 ENV DEBIAN_FRONTEND noninteractive @@ -185,7 +88,6 @@ ENV DEBUGGER "/usr/local/bin/box86" # Set SHELL option explicitly SHELL ["/bin/bash", "-o", "pipefail", "-c"] -COPY --from=qemu_build /build/qemu-user-static/bin/qemu-i386 /usr/bin/qemu-i386-static COPY --from=box64_m1 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-m1 COPY --from=box64_rpi5 /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-rpi5 COPY --from=box64_adlink /tmp/install/usr/local/bin/box64 /usr/local/bin/box64-adlink @@ -240,6 +142,7 @@ RUN set -x \ # Symlink steamclient.so; So misconfigured dedicated servers can find it && mkdir -p /usr/lib/x86_64-linux-gnu \ && ln -s "${STEAMCMDDIR}/linux64/steamclient.so" "/usr/lib/x86_64-linux-gnu/steamclient.so" \ + && ln -s "${STEAMCMDDIR}/linux32/steamclient.so" "/usr/lib/i386-linux-gnu/steamclient.so" \ && rm -rf /var/lib/apt/lists/* \ && mv /usr/local/bin/box64 /usr/local/bin/box64-generic