-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
Dockerfile
28 lines (20 loc) · 914 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
ARG REPO=mcr.microsoft.com/dotnet/runtime-deps
# Installer image
FROM $REPO:9.0.0-azurelinux3.0-arm64v8 AS installer
RUN tdnf install -y \
tar \
&& tdnf clean all
# Retrieve .NET Runtime
RUN dotnet_version=9.0.0 \
&& curl -fSL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$dotnet_version/dotnet-runtime-$dotnet_version-linux-arm64.tar.gz \
&& dotnet_sha512='4f9c2dd544af0b8540c16352b9f01f75f828b8e4e084057a300a4dec652fb3d6532906cdd4246399cc13f16b571b17575812ec2f9c297e27bbed678baf4b2fde' \
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /dotnet \
&& tar -oxzf dotnet.tar.gz -C /dotnet \
&& rm dotnet.tar.gz
# .NET runtime image
FROM $REPO:9.0.0-azurelinux3.0-arm64v8
# .NET Runtime version
ENV DOTNET_VERSION=9.0.0
COPY --from=installer ["/dotnet", "/usr/share/dotnet"]
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet