forked from dotnet/dotnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (21 loc) · 1.01 KB
/
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
# Installer image
FROM mcr.microsoft.com/azurelinux/base/core:3.0 AS installer
RUN tdnf install -y \
ca-certificates \
gzip \
tar \
&& tdnf clean all
# Retrieve ASP.NET Core
RUN aspnetcore_version=9.0.0-rc.2.24474.3 \
&& curl -fSL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-arm64.tar.gz \
&& aspnetcore_sha512='b6de668ce8714476be78ae00ed66027f3a5b06d95c6768ad6b3eca4d0f396c91843267c0e8c03160b709a7acdcbc2b09047f1ec8d46309d40c3d31f849cc981f' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /dotnet \
&& tar -oxzf aspnetcore.tar.gz -C /dotnet ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz
# ASP.NET Core image
FROM $REPO:9.0.0-rc.2-azurelinux3.0-distroless-arm64v8
# ASP.NET Core version
ENV ASPNET_VERSION=9.0.0-rc.2.24474.3
COPY --from=installer ["/dotnet", "/usr/share/dotnet"]