Last active
November 17, 2020 21:03
-
-
Save richlander/4be82f104e5323cca8493eb35a3ea773 to your computer and use it in GitHub Desktop.
.NET Core 3.0 Preview 3 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/core/runtime:3.0 AS base | |
WORKDIR /app | |
EXPOSE 80 | |
EXPOSE 443 | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.0 AS build | |
WORKDIR /src | |
COPY ["WebApplication4/WebApplication4.csproj", "WebApplication4/"] | |
RUN dotnet restore "WebApplication4/WebApplication4.csproj" | |
COPY . . | |
WORKDIR "/src/WebApplication4" | |
RUN dotnet build "WebApplication4.csproj" -c Release -o /app | |
FROM build AS publish | |
RUN dotnet publish "WebApplication4.csproj" -c Release -o /app | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app . | |
ENTRYPOINT ["dotnet", "WebApplication4.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment