This file contains 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/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 |
This file contains 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
docker build -f Dockerfile.build -t myapi | |
id=$(docker create myapi) | |
docker cp $id:/output output/ | |
docker rm -v $id |
No comments:
Post a Comment