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
|
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy csproj and restore as distinct layers
|
# API Restore
|
||||||
COPY **/*.csproj ./
|
WORKDIR /app/OFBButte.Api
|
||||||
RUN ls
|
COPY OFBButte.Api/*.csproj ./
|
||||||
RUN dotnet restore
|
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
|
# Copy everything else and build
|
||||||
|
WORKDIR /app
|
||||||
|
RUN ls
|
||||||
COPY . ./
|
COPY . ./
|
||||||
RUN dotnet publish -c Release -o out
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue