Skip to content

Instantly share code, notes, and snippets.

@mafshin
Created March 31, 2019 08:27
Show Gist options
  • Save mafshin/5010ddac7aa697561060cf6f7c8c537b to your computer and use it in GitHub Desktop.
Save mafshin/5010ddac7aa697561060cf6f7c8c537b 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/runtime-deps:2.2-alpine as runtime
WORKDIR /app
EXPOSE 80
COPY --from=build /app/out ./
ENTRYPOINT ["./demoapp"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment