Skip to content

Instantly share code, notes, and snippets.

@michalpenka
Last active March 18, 2020 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michalpenka/cc20f49781dca2afaff75aecf43d1350 to your computer and use it in GitHub Desktop.
Save michalpenka/cc20f49781dca2afaff75aecf43d1350 to your computer and use it in GitHub Desktop.
Dockerfile for ASP.NET Core application (ARM64v8)
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim-arm64v8 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet build -c Release -o /app/build
FROM build AS publish
RUN dotnet publish -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "helloworld.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment