Skip to content

Instantly share code, notes, and snippets.

@fredrkl
Created November 6, 2018 15:44
Show Gist options
  • Save fredrkl/b8974890a97ffadcb929afb0c844a02d to your computer and use it in GitHub Desktop.
Save fredrkl/b8974890a97ffadcb929afb0c844a02d to your computer and use it in GitHub Desktop.
ROM microsoft/dotnet:2.1-runtime-deps-stretch-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install ASP.NET Core
ENV ASPNETCORE_VERSION 2.1.5
RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/aspnetcore/Runtime/$ASPNETCORE_VERSION/aspnetcore-runtime-$ASPNETCORE_VERSION-linux-x64.tar.gz \
&& aspnetcore_sha512='3326963ba0a431ca430d8f1a7940487e516952ec560da563f03662b71b2ac8b5d9904b0e1422212e452b49f563349d10fea34241f4d5e4811d0aedc02c557029' \
&& echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \
&& mkdir -p /usr/share/dotnet \
&& tar -zxf aspnetcore.tar.gz -C /usr/share/dotnet \
&& rm aspnetcore.tar.gz \
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment