From 310ed2569e66da6c92dd132beb5665bfb20bf751 Mon Sep 17 00:00:00 2001 From: Quinten <67589015+QuintenQVD0@users.noreply.github.com> Date: Sat, 29 Jul 2023 19:21:34 +0200 Subject: [PATCH] make the installer image work for ARM64 and AMD64 --- .github/workflows/installers.yml | 3 ++- installers/debian/Dockerfile | 13 +++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/installers.yml b/.github/workflows/installers.yml index 2078532ae..cc45707d6 100644 --- a/.github/workflows/installers.yml +++ b/.github/workflows/installers.yml @@ -21,6 +21,7 @@ jobs: - ubuntu steps: - uses: actions/checkout@v3 + - uses: docker/setup-qemu-action@v2 - uses: docker/setup-buildx-action@v2 with: buildkitd-flags: --debug @@ -33,7 +34,7 @@ jobs: with: context: ./installers file: ./installers/${{ matrix.tag }}/Dockerfile - platforms: linux/amd64 + platforms: linux/amd64,linux/arm64 push: true tags: | ghcr.io/parkervcp/installers:${{ matrix.tag }} diff --git a/installers/debian/Dockerfile b/installers/debian/Dockerfile index e0b1fbf07..aafb0b693 100644 --- a/installers/debian/Dockerfile +++ b/installers/debian/Dockerfile @@ -29,7 +29,12 @@ LABEL org.opencontainers.image.licenses=MIT ENV DEBIAN_FRONTEND=noninteractive -RUN dpkg --add-architecture i386 \ - && apt update \ - && apt upgrade -y \ - && apt -y --no-install-recommends install ca-certificates curl lib32gcc-s1 libsdl2-2.0-0:i386 git unzip zip tar jq wget +RUN apt update && apt upgrade -y \ + && apt -y --no-install-recommends install ca-certificates curl git unzip zip tar jq wget + +# Only install the needed steamcmd packages on the AMD64 build +RUN if [ "$(uname -m)" = "x86_64" ]; then \ + dpkg --add-architecture i386 && \ + apt update && \ + apt -y install lib32gcc-s1 libsdl2-2.0-0:i386; \ + fi \ No newline at end of file