Skip to content

Instantly share code, notes, and snippets.

@rstropek
Created September 8, 2020 11:25
Show Gist options
  • Save rstropek/3a8523c6868413a11b02f93acf91bd17 to your computer and use it in GitHub Desktop.
Save rstropek/3a8523c6868413a11b02f93acf91bd17 to your computer and use it in GitHub Desktop.
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY *.csproj ./
RUN dotnet restore
# Copy everything else and build
COPY . ./
RUN dotnet publish -o out
# Build runtime image
FROM mcr.microsoft.com/dotnet/runtime:5.0
WORKDIR /app
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "SigintSigterm.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment