Skip to content

Instantly share code, notes, and snippets.

@cbjpdev
Last active December 8, 2020 06:24
.DOTNETCORE docker build
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /src
COPY myapi/*.csproj ./src/myapi/
COPY myapi.sln NuGet.config ./src
RUN dotnet restore ./src/myapi/*.csproj
COPY . ./
RUN dotnet publish ./src/myapi/myapi.csproj -c release -o /output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment