restore each project independantly

test
dan 2020-10-30 19:31:25 -06:00
parent ad9687083b
commit d517d883a8
1 changed files with 26 additions and 3 deletions

View File

@ -1,12 +1,35 @@
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app
# Copy csproj and restore as distinct layers
COPY **/*.csproj ./
RUN ls
# API Restore
WORKDIR /app/OFBButte.Api
COPY OFBButte.Api/*.csproj ./
RUN dotnet restore
# Application Restore
WORKDIR /app/OFBButte.Application
COPY Application.Api/*.csproj ./
RUN dotnet restore
# Database Restore
WORKDIR /app/OFBButte.Database
COPY OFBButte.Database/*.csproj ./
RUN dotnet restore
# Entities Restore
WORKDIR /app/OFBButte.Entities
COPY OFBButte.Entities/*.csproj ./
RUN dotnet restore
# Infrastructure Restore
WORKDIR /app/OFBButte.Infrastructure
COPY OFBButte.Infrastructure/*.csproj ./
RUN dotnet restore
# Copy everything else and build
WORKDIR /app
RUN ls
COPY . ./
RUN dotnet publish -c Release -o out