Skip to content

Instantly share code, notes, and snippets.

@mafshin
Last active March 31, 2019 08:22
Show Gist options
  • Save mafshin/3741035e1ece31e03394eecd395108aa to your computer and use it in GitHub Desktop.
Save mafshin/3741035e1ece31e03394eecd395108aa to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine as build
WORKDIR /app
COPY *.csproj .
RUN dotnet restore -r linux-musl-x64
COPY . .
RUN dotnet publish -c Release -r linux-musl-x64 -o out --no-restore
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine as runtime
WORKDIR /app
EXPOSE 80
COPY --from=build /app/out ./
ENTRYPOINT ["dotnet","./demoapp.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment