Created
May 8, 2022 09:19
-
-
Save kyawzaymoore/8d5101d8fbf9e087feba47564df1fdf9 to your computer and use it in GitHub Desktop.
dotnet docker file
This file contains 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-env | |
WORKDIR /app | |
# Copy everything | |
COPY . ./ | |
# Restore as distinct layers | |
RUN dotnet restore | |
# Build and publish a release | |
RUN dotnet publish -c Release -o out | |
# Build runtime image | |
FROM mcr.microsoft.com/dotnet/aspnet:6.0 | |
WORKDIR /app | |
COPY --from=build-env /app/out . | |
ENTRYPOINT ["dotnet", "fidotech.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment