Skip to content

Instantly share code, notes, and snippets.

@rahulsahay19
Last active July 12, 2019 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulsahay19/9c2d8a8c3a8bd0842e05e31b0c2ef99f to your computer and use it in GitHub Desktop.
Save rahulsahay19/9c2d8a8c3a8bd0842e05e31b0c2ef99f to your computer and use it in GitHub Desktop.
Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /AKSWeb
COPY NuGet.config ./
COPY AKSWeb.csproj ./
RUN dotnet restore
COPY . ./
RUN dotnet publish --configuration Release --output releaseOutput --no-restore
#build runtime image
FROM mcr.microsoft.com/dotnet/core/aspnet
WORKDIR /AKSWeb
COPY --from=build-env /AKSWeb/releaseOutput ./
ENTRYPOINT ["dotnet", "AKSWeb.dll"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment