From f2cb8ae86caaea84f5d2f447e76b0b8eb009ec5b Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Pinheiro <3842788+dscpinheiro@users.noreply.github.com> Date: Thu, 5 Dec 2019 07:25:00 -0500 Subject: [PATCH] Update Dockerfile --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6581b0a..278dbe7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,17 @@ FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS builder WORKDIR /src # Copy csproj and restore as distinct layers +COPY Messages.Helpers/*.csproj ./Messages.Helpers/ COPY Messages.Api/*.csproj ./Messages.Api/ + WORKDIR /src/Messages.Api RUN dotnet restore # Copy everything else and publish artifacts -COPY Messages.Api/. . +COPY Messages.Helpers/. /src/Messages.Helpers/ +COPY Messages.Api/. /src/Messages.Api/ + +WORKDIR /src/Messages.Api RUN dotnet publish --configuration Release --output artifacts # Build runtime image