Skip to content

Instantly share code, notes, and snippets.

@SumindaD
Created May 13, 2019 10:32
Show Gist options
  • Save SumindaD/50f490dba5b89007da6b2dbb90537bd5 to your computer and use it in GitHub Desktop.
Save SumindaD/50f490dba5b89007da6b2dbb90537bd5 to your computer and use it in GitHub Desktop.
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
FROM microsoft/dotnet:2.1-sdk AS build
WORKDIR /src
COPY ["Audit/AuditAPI.csproj", "Audit/"]
RUN dotnet restore "Audit/AuditAPI.csproj"
COPY . .
WORKDIR "/src/Audit"
RUN dotnet build "AuditAPI.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "AuditAPI.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "AuditAPI.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment