Last active
February 28, 2021 22:04
-
-
Save screamingworld/621a77f96b17b6c6811b589f76726e59 to your computer and use it in GitHub Desktop.
Notifier Web Api - 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/sdk:3.1-buster AS base | |
WORKDIR /app | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build | |
WORKDIR /src | |
COPY ["./WebApi/Notifier.WebApi/Notifier.WebApi.csproj", "src/WebApi/Notifier.WebApi/"] | |
COPY ["./Common/Notifier.Common/Notifier.Common.csproj", "src/Common/Notifier.Common/"] | |
RUN dotnet restore "src/WebApi/Notifier.WebApi/Notifier.WebApi.csproj" | |
COPY . . | |
WORKDIR "/src/WebApi/Notifier.WebApi" | |
RUN dotnet build "Notifier.WebApi.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "Notifier.WebApi.csproj" -c Release -o /app/publish | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish . | |
ENTRYPOINT ["dotnet", "Notifier.WebApi.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment