-
Notifications
You must be signed in to change notification settings - Fork 2k
/
Copy pathDockerfile
26 lines (19 loc) · 940 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
ARG REPO=mcr.microsoft.com/dotnet/runtime
# Installer image
FROM $REPO:9.0.4-azurelinux3.0-amd64 AS installer
RUN tdnf install -y \
tar \
&& tdnf clean all
# Retrieve ASP.NET Core
RUN aspnetcore_version=9.0.4 \
&& 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='f3eae8863634a050b90b672b14d466a44c623ca06c6501a3a70efea93e540995e2fa348ae5ef7a3f278110a9ba24043a651150a378e4e5a84c25690b73364132' \
&& 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.4-azurelinux3.0-amd64
# ASP.NET Core version
ENV ASPNET_VERSION=9.0.4
COPY --from=installer ["/dotnet", "/usr/share/dotnet"]