From 9dd922efac4e1d63c9edefa265be75694edad834 Mon Sep 17 00:00:00 2001 From: andy Date: Sun, 13 Feb 2022 12:23:43 +0000 Subject: [PATCH] docker file build tweaking --- Dockerfile.CLI | 5 ++--- Dockerfile.Web | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile.CLI b/Dockerfile.CLI index 49221f1..0e185b6 100644 --- a/Dockerfile.CLI +++ b/Dockerfile.CLI @@ -9,9 +9,8 @@ COPY Selector.CLI/*.csproj ./Selector.CLI/ RUN dotnet restore COPY . ./ -WORKDIR /Selector.CLI -RUN dotnet publish Selector.CLI.csproj -c Release -COPY ./bin/Release/net6.0/publish/ App/ +RUN dotnet publish Selector.CLI/Selector.CLI.csproj -c Release +COPY ./Selector.CLI/bin/Release/net6.0/publish/ App/ FROM mcr.microsoft.com/dotnet/runtime:6.0 COPY --from=build bin/Release/net6.0/publish/ App/ diff --git a/Dockerfile.Web b/Dockerfile.Web index 434c5bc..b6aef2f 100644 --- a/Dockerfile.Web +++ b/Dockerfile.Web @@ -9,13 +9,12 @@ COPY Selector.Web/*.csproj ./Selector.Web/ RUN dotnet restore COPY . ./ -WORKDIR /Selector.Web -RUN dotnet publish Selector.Web.csproj -c Release -COPY ./bin/Release/net6.0/publish/ App/ +RUN dotnet publish Selector.Web/Selector.Web.csproj -c Release +COPY ./Selector.Web/bin/Release/net6.0/publish/ App/ FROM mcr.microsoft.com/dotnet/aspnet:6.0 EXPOSE 80 -COPY --from=build bin/Release/net6.0/publish/ App/ +COPY --from=build Selector.Web/bin/Release/net6.0/publish/ App/ WORKDIR /App ENV DOTNET_EnableDiagnostics=0 ENTRYPOINT ["dotnet", "Selector.Web.dll"]