forked from dotnet/dotnet-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
25 lines (18 loc) · 869 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-deps
ARG DOTNET_VERSION=5.0.0-preview.8.20407.11
# Installer image
FROM amd64/buildpack-deps:buster-curl as installer
ARG DOTNET_VERSION
# Retrieve .NET
RUN curl -SL --output dotnet.tar.gz https://dotnetcli.azureedge.net/dotnet/Runtime/$DOTNET_VERSION/dotnet-runtime-$DOTNET_VERSION-linux-x64.tar.gz \
&& dotnet_sha512='1b609d1bd928fc2015a7148c340d648f80f0e41d39284ac73a5a9e701425ec2c933958e3d9977e780866654876a7c7b3cb2af9f1ec1a426c6aed8538ab15925c' \
&& echo "$dotnet_sha512 dotnet.tar.gz" | sha512sum -c - \
&& mkdir -p /dotnet \
&& tar -ozxf dotnet.tar.gz -C /dotnet \
&& rm dotnet.tar.gz
# .NET runtime image
FROM $REPO:5.0-buster-slim
ARG DOTNET_VERSION
ENV DOTNET_VERSION $DOTNET_VERSION
COPY --from=installer ["/dotnet", "/usr/share/dotnet"]
RUN ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet