From 9e9e1626a7a1686c8e22d72e8a892a938908d53a 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 | 11 ++++++++--- 2 files changed, 10 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..1a5501cb 100644 --- a/build/docker/debian.Dockerfile +++ b/build/docker/debian.Dockerfile @@ -64,6 +64,11 @@ 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. +ENV DOTNET_ROOT /usr/lib/dotnet +ENV DOTNET_MAJOR 7.0 +RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh +RUN chmod +x ./dotnet-install.sh +RUN ./dotnet-install.sh --channel $DOTNET_MAJOR --install-dir $DOTNET_ROOT +RUN rm ./dotnet-install.sh +ENV PATH $DOTNET_ROOT:$PATH \ No newline at end of file