restore each project independantly
parent
ad9687083b
commit
d517d883a8
29
dockerfile
29
dockerfile
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue