Skip to content

Instantly share code, notes, and snippets.

@awswithdotnet
Created March 9, 2022 22:13
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 awswithdotnet/cddba3d0de2b26892321696a289cdb8f to your computer and use it in GitHub Desktop.
Save awswithdotnet/cddba3d0de2b26892321696a289cdb8f to your computer and use it in GitHub Desktop.
minimalapi Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS sdk
WORKDIR /app
COPY ./ ./
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/aspnet:6.0
WORKDIR /app
COPY --from=sdk /app/out .
ENTRYPOINT ["dotnet", "MinimalApi.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment