-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathDockerfile
25 lines (18 loc) · 960 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
ARG REPO=mcr.microsoft.com/dotnet/runtime
# Installer image
FROM $REPO:9.0.2-azurelinux3.0-amd64 AS installer
RUN tdnf install -y \
tar \
&& tdnf clean all
# Retrieve ASP.NET Core
RUN aspnetcore_version=9.0.2 \
&& curl -fSL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-x64.tar.gz \
&& aspnetcore_sha512='48a39dd4bee3e719273a4e4404b556e2e59e7f659def49f89745ae575fc976f7ebf121d9263c3d009db6081976f8261ca82de34aef69b0776a28fd0485bb6d3b' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& tar -oxzf aspnetcore.tar.gz ./shared/Microsoft.AspNetCore.App \
&& rm aspnetcore.tar.gz
# ASP.NET Core image
FROM $REPO:9.0.2-azurelinux3.0-amd64
# ASP.NET Core version
ENV ASPNET_VERSION=9.0.2
COPY --from=installer ["/shared/Microsoft.AspNetCore.App", "/usr/share/dotnet/shared/Microsoft.AspNetCore.App"]