Created
December 9, 2022 06:53
-
-
Save dangdennis/57574dd1757f3e03605b4d5b81ad1755 to your computer and use it in GitHub Desktop.
F# asp.net dockerfile
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:7.0-alpine AS build | |
WORKDIR /app | |
# Copy source code and compile | |
COPY ./ ./ | |
RUN dotnet restore | |
RUN dotnet publish --configuration Release -o bin | |
# Build runtime image | |
FROM mcr.microsoft.com/dotnet/aspnet:7.0-alpine AS runtime | |
WORKDIR /app | |
COPY --from=build /app/bin . | |
# Rename WebApiTest.dll to YourProjectName.dll | |
ENTRYPOINT ["dotnet", "WebApiTest.dll", "--urls", "http://0.0.0.0:8080"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment