-
-
Save GbengaElebs/bf0ba0e07abf81bad25f6417ee557e72 to your computer and use it in GitHub Desktop.
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/aspnet:3.1 AS base | |
WORKDIR /app | |
EXPOSE 80/tcp | |
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS build | |
WORKDIR /src | |
COPY ["TestApi.csproj", "./"] | |
RUN dotnet restore "TestApi.csproj" | |
COPY . . | |
WORKDIR "/src/." | |
RUN dotnet build "TestApi.csproj" -c Release -o /app/build | |
FROM build AS publish | |
RUN dotnet publish "TestApi.csproj" -c Release -o /app/publish | |
FROM base AS final | |
WORKDIR /app | |
COPY --from=publish /app/publish . | |
ENTRYPOINT ["dotnet", "TestApi.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment