Created
April 9, 2019 19:59
-
-
Save Jtorrecilla/0d3ef746e18c8db36854edfc8227fcb4 to your computer and use it in GitHub Desktop.
Initial Docker Azure Artifact
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:2.2-stretch-slim AS base | |
| WORKDIR /app | |
| EXPOSE 80 | |
| EXPOSE 443 | |
| FROM microsoft/dotnet:2.2-sdk AS build | |
| WORKDIR /src | |
| COPY / /src/Services/MyApi/ | |
| WORKDIR /src/Services/MyApi/MyApi.Api | |
| RUN dotnet restore MyApi.csproj -nowarn:msb3202,nu1503 | |
| FROM build AS publish | |
| RUN dotnet build MyApi.csproj --no-restore -c Release -o /app | |
| FROM base AS final | |
| WORKDIR /app | |
| COPY --from=publish /app . | |
| ENTRYPOINT ["dotnet", "MyApi.dll"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment