Last active
December 15, 2022 00:55
-
-
Save gistlyn/ed8043e696d985603db14eb66f7593e4 to your computer and use it in GitHub Desktop.
dotnet-build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build | |
WORKDIR /app | |
COPY . . | |
RUN dotnet restore | |
WORKDIR /app/MyApp | |
RUN dotnet publish -c release -o /out --no-restore | |
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime | |
WORKDIR /app | |
COPY --from=build /out ./ | |
ENTRYPOINT ["dotnet", "MyApp.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment