From 707187483e7cefdd67c83d31c33ef53989baca84 Mon Sep 17 00:00:00 2001 From: ProgHaj Date: Thu, 21 Sep 2023 16:15:43 +0200 Subject: [PATCH] Use installation script for dotnet to support arm64 + amd64 --- .github/workflows/docker.yml | 4 ++-- build/docker/debian.Dockerfile | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d30cb146..0cd6f867 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,7 +3,7 @@ name: Docker on: push: branches: - - main + - fix-debian-image tags: - 'v*' @@ -67,6 +67,6 @@ jobs: file: build/docker/${{ matrix.docker-os }}.Dockerfile target: ${{ matrix.stage }} platforms: linux/amd64,linux/arm64 - push: ${{ github.event_name != 'pull_request' }} + push: false tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/build/docker/debian.Dockerfile b/build/docker/debian.Dockerfile index 18f6d715..37d7a0b9 100644 --- a/build/docker/debian.Dockerfile +++ b/build/docker/debian.Dockerfile @@ -64,6 +64,9 @@ RUN npm install -g npm@latest RUN npm install --global yarn -RUN wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && dpkg -i packages-microsoft-prod.deb -RUN rm packages-microsoft-prod.deb -RUN apt -y update && apt -y upgrade && apt install -y dotnet-sdk-7.0 \ No newline at end of file +# Package manager installs are only supported on the x64 architecture. Other architectures, such as Arm, must install .NET by some other means such as with Snap, an installer script, or through a manual binary installation. +RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh +RUN chmod +x ./dotnet-install.sh +RUN ./dotnet-install.sh --channel 7.0 +ENV DOTNET_ROOT $HOME/.dotnet +ENV PATH $DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH \ No newline at end of file