Skip to content

Commit

Permalink
Use installation script for dotnet to support arm64 + amd64
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgHaj committed Sep 21, 2023
1 parent 3f1827f commit 67a7db6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Docker
on:
push:
branches:
- main
- fix-debian-image
tags:
- 'v*'

Expand Down Expand Up @@ -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 }}
14 changes: 11 additions & 3 deletions build/docker/debian.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
# 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 u+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

0 comments on commit 67a7db6

Please sign in to comment.