Skip to content

Instantly share code, notes, and snippets.

@MauriRojas
Created June 4, 2018 07:31
Show Gist options
  • Save MauriRojas/20857dd06d84fdd14ae6919532621ff7 to your computer and use it in GitHub Desktop.
Save MauriRojas/20857dd06d84fdd14ae6919532621ff7 to your computer and use it in GitHub Desktop.
Dockerfile for an ASP.NET Core web app
FROM microsoft/aspnetcore-build:2.0 AS build-env
WORKDIR /app
COPY *.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish -c Release -o out
FROM microsoft/aspnetcore-build:2.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "aspnetcoreapp.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment