From f415a0104ca29f4745a6622ff0fb5937b1cc4d70 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 --- build/docker/debian.Dockerfile | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/build/docker/debian.Dockerfile b/build/docker/debian.Dockerfile index 18f6d715..46ce2f92 100644 --- a/build/docker/debian.Dockerfile +++ b/build/docker/debian.Dockerfile @@ -64,6 +64,14 @@ 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 +# https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual#scripted-install +# https://learn.microsoft.com/en-us/dotnet/core/install/linux-debian +# 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 +RUN dotnet --version \ No newline at end of file