Created
January 2, 2020 22:44
-
-
Save felipebossolani/ea04b1ab5457e4acd49c968d7ef9c3d0 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/aspnet:3.1-buster-slim AS base | |
WORKDIR /app | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
WORKDIR /src | |
COPY ["app.csproj", ""] | |
RUN dotnet restore "./app.csproj" | |
COPY . . | |
WORKDIR /src | |
RUN dotnet build "app.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "app.csproj" -c Release -o /app/publish | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish . | |
RUN dotnet --version | |
ENV ASPNETCORE_URLS http://*:5000 | |
EXPOSE 5000 | |
ENTRYPOINT ["dotnet", "app/app.dll", "--server.urls", "http://*:5000"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment