Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build
WORKDIR /src
COPY ["DockerImage.csproj", ""]
RUN dotnet restore "./DockerImage.csproj"
COPY . .
WORKDIR "/src/."
RUN dotnet build "DockerImage.csproj" -c Release -o /app
FROM build AS publish
RUN dotnet publish "DockerImage.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "DockerImage.dll"]
@sakaldeepyadav

This comment has been minimized.

Copy link
Owner Author

@sakaldeepyadav sakaldeepyadav commented Apr 9, 2020

make public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.