Skip to content

Instantly share code, notes, and snippets.

@horsdal
Created February 15, 2019 08:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save horsdal/8a42ca27586a2bb51af4a3eca7f72136 to your computer and use it in GitHub Desktop.
Save horsdal/8a42ca27586a2bb51af4a3eca7f72136 to your computer and use it in GitHub Desktop.
Build self container .NET Core app
FROM microsoft/dotnet:2.2-aspnetcore-runtime AS base
FROM microsoft/dotnet:2.2-sdk AS build
WORKDIR /src
COPY . .
RUN dotnet restore DbUp.csproj
ENTRYPOINT ["dotnet", "publish", "-r", "linux-x64", "-c", "release", "--self-contained"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment