-
Notifications
You must be signed in to change notification settings - Fork 2k
/
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=10.0.0-preview.3.25172.1 \
&& curl -fSL --output aspnetcore.tar.gz https://ci.dot.net/public/aspnetcore/Runtime/$aspnetcore_version/aspnetcore-runtime-$aspnetcore_version-linux-x64.tar.gz \
&& aspnetcore_sha512='592e78f23d0eeec3fe21d3885d6b4b2ce65538e6a987d9d4094dd5acfc98351eaa8441845d53bc0cdc1d49f3b4c1e6a93a0ddacd44bd5c7f50a01eeae76247f4' \
&& 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:10.0.0-preview.3-azurelinux3.0-distroless-amd64
# ASP.NET Core version
ENV ASPNET_VERSION=10.0.0-preview.3.25172.1
COPY --from=installer ["/dotnet", "/usr/share/dotnet"]