Skip to content

Instantly share code, notes, and snippets.

@changhuixu
Created May 29, 2020 04:00
Show Gist options
  • Select an option

  • Save changhuixu/a22c1bab2d0a7989111ae1e86fd07a6c to your computer and use it in GitHub Desktop.

Select an option

Save changhuixu/a22c1bab2d0a7989111ae1e86fd07a6c to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
WORKDIR /app
COPY ./*.csproj ./
RUN dotnet restore
COPY . .
RUN dotnet publish -c Release -o /out --no-restore
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime
WORKDIR /app
COPY --from=build /out ./
ENTRYPOINT ["dotnet", "OrderApi.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment