Created
June 26, 2020 19:51
-
-
Save changhuixu/96f6b236d8751c5c21a6e00d43584201 to your computer and use it in GitHub Desktop.
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/core/sdk:3.1-alpine AS build | |
WORKDIR /app | |
COPY *.sln . | |
COPY MyWebApi/*.csproj ./MyWebApi/ | |
RUN dotnet restore | |
COPY MyWebApi/. ./MyWebApi/ | |
WORKDIR /app/MyWebApi | |
RUN dotnet publish -c Release -o /out --no-restore | |
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime | |
WORKDIR /app | |
COPY --from=build /out ./ | |
ENV ASPNETCORE_URLS http://*:5000 | |
ENTRYPOINT ["dotnet", "MyWebApi.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment