diff --git a/.dockerignore b/.dockerignore
index dd3d41423..5fbf98f1e 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -7,7 +7,6 @@
docker-compose*.yml
docker-compose.dcproj
*.sln
-!eShopOnContainers-ServicesAndWebApps.sln
*.md
hosts
LICENSE
@@ -31,4 +30,13 @@ cli-linux
**/wwwroot/lib/*
global.json
**/appsettings.localhost.json
-src/Web/WebSPA/wwwroot/
\ No newline at end of file
+src/Web/WebSPA/wwwroot/
+packages/
+csproj-files/
+test-results/
+TestResults/
+src/Mobile/
+src/Web/Catalog.WebForms/
+src/Web/WebMonolithic/
+src/BuildingBlocks/CommandBus/
+src/Services/Marketing/Infrastructure/
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0b98fe6a0..f3fdf2b8f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,6 +26,9 @@ bld/
# Visual Studio 2015 cache/options directory
.vs/
+# Dockerfile projects folder for restore-packages script
+csproj-files/
+
# .js files created on build:
src/Web/WebMVC/wwwroot/js/site*
@@ -42,6 +45,8 @@ src/Web/WebMVC/wwwroot/js/site*
*.VisualState.xml
TestResult.xml
+tests-results/
+
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
diff --git a/build/azure-devops/apigws/azure-pipelines.yml b/build/azure-devops/apigws/azure-pipelines.yml
index adf00e4d0..6fedf33a6 100644
--- a/build/azure-devops/apigws/azure-pipelines.yml
+++ b/build/azure-devops/apigws/azure-pipelines.yml
@@ -50,31 +50,3 @@ jobs:
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/k8s/helm
artifactName: helm
-- job: BuildWindows
- pool:
- vmImage: 'vs2017-win2016'
- steps:
- - task: DockerCompose@0
- displayName: Compose build apigws
- inputs:
- dockerComposeCommand: 'build mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
- containerregistrytype: Container Registry
- dockerRegistryEndpoint: $(registryEndpoint)
- dockerComposeFile: docker-compose.yml
- qualifyImageNames: true
- projectName: ""
- dockerComposeFileArgs: |
- TAG=$(Build.SourceBranchName)
- PLATFORM=win
- - task: DockerCompose@0
- displayName: Compose push apigws
- inputs:
- dockerComposeCommand: 'push mobileshoppingapigw mobilemarketingapigw webshoppingapigw webmarketingapigw'
- containerregistrytype: Container Registry
- dockerRegistryEndpoint: $(registryEndpoint)
- dockerComposeFile: docker-compose.yml
- qualifyImageNames: true
- projectName: ""
- dockerComposeFileArgs: |
- TAG=$(Build.SourceBranchName)
- PLATFORM=win
\ No newline at end of file
diff --git a/restore-packages.cmd b/restore-packages.cmd
new file mode 100644
index 000000000..4e99614d6
--- /dev/null
+++ b/restore-packages.cmd
@@ -0,0 +1 @@
+for /R %%f in (*.csproj) do dotnet restore --no-dependencies %%f
diff --git a/scripts/restore-packages b/scripts/restore-packages
new file mode 100644
index 000000000..9edc44b03
--- /dev/null
+++ b/scripts/restore-packages
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+for f in /src/csproj-files/*.csproj; do dotnet restore $f; done
diff --git a/scripts/restore-packages.cmd b/scripts/restore-packages.cmd
new file mode 100644
index 000000000..9f3a8434e
--- /dev/null
+++ b/scripts/restore-packages.cmd
@@ -0,0 +1 @@
+for %%p in (csproj-files\*.csproj) do dotnet restore %%p
diff --git a/src/ApiGateways/ApiGw-Base/Dockerfile b/src/ApiGateways/ApiGw-Base/Dockerfile
index ed6d75229..f4751f2d1 100644
--- a/src/ApiGateways/ApiGw-Base/Dockerfile
+++ b/src/ApiGateways/ApiGw-Base/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/ApiGateways/ApiGw-Base/
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
index d25a98e6c..d29c73b3e 100644
--- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
+++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
index 75aa0f507..8ac850778 100644
--- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
+++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile
index af5c31654..81955e178 100644
--- a/src/Services/Basket/Basket.API/Dockerfile
+++ b/src/Services/Basket/Basket.API/Dockerfile
@@ -4,19 +4,29 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Basket/Basket.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
-
-FROM build as functionaltest
-WORKDIR /src/src/Services/Basket/Basket.FunctionalTests
+RUN dotnet publish -c Release -o /app
FROM build as unittest
WORKDIR /src/src/Services/Basket/Basket.UnitTests
+FROM build as functionaltest
+WORKDIR /src/src/Services/Basket/Basket.FunctionalTests
+
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile
index 317146c0c..70a97da27 100644
--- a/src/Services/Catalog/Catalog.API/Dockerfile
+++ b/src/Services/Catalog/Catalog.API/Dockerfile
@@ -4,10 +4,21 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Catalog/Catalog.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build as unittest
WORKDIR /src/src/Services/Catalog/Catalog.UnitTests
@@ -16,7 +27,6 @@ FROM build as functionaltest
WORKDIR /src/src/Services/Catalog/Catalog.FunctionalTests
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile
index af45d8da8..ed1502208 100644
--- a/src/Services/Identity/Identity.API/Dockerfile
+++ b/src/Services/Identity/Identity.API/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Identity/Identity.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Location/Locations.API/Dockerfile b/src/Services/Location/Locations.API/Dockerfile
index c33f6b9c4..5f5a0c88a 100644
--- a/src/Services/Location/Locations.API/Dockerfile
+++ b/src/Services/Location/Locations.API/Dockerfile
@@ -4,16 +4,26 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Location/Locations.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build as functionaltest
WORKDIR /src/src/Services/Location/Locations.FunctionalTests
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Marketing/Marketing.API/Dockerfile b/src/Services/Marketing/Marketing.API/Dockerfile
index abcd1c631..bd9e3807b 100644
--- a/src/Services/Marketing/Marketing.API/Dockerfile
+++ b/src/Services/Marketing/Marketing.API/Dockerfile
@@ -4,16 +4,26 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Marketing/Marketing.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build as functionaltest
WORKDIR /src/src/Services/Marketing/Marketing.FunctionalTests
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj b/src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj
index 14f49f53e..eaedddbd5 100644
--- a/src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj
+++ b/src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj
@@ -19,7 +19,7 @@
-
+
@@ -30,7 +30,6 @@
-
diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile
index 96aa10404..aa1f0e9c6 100644
--- a/src/Services/Ordering/Ordering.API/Dockerfile
+++ b/src/Services/Ordering/Ordering.API/Dockerfile
@@ -4,19 +4,29 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
-
-FROM build as functionaltest
-WORKDIR /src/src/Services/Ordering/Ordering.FunctionalTests
+RUN dotnet publish -c Release -o /app
FROM build as unittest
WORKDIR /src/src/Services/Ordering/Ordering.UnitTests
+FROM build as functionaltest
+WORKDIR /src/src/Services/Ordering/Ordering.FunctionalTests
+
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
index 94f0a88ca..0c121f4a8 100644
--- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
+++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile
index f2634b2fe..a40dc797f 100644
--- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile
+++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore Ordering.SignalrHub.csproj -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore Ordering.SignalrHub.csproj -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile
index 760a1be0a..dcaf9b5e8 100644
--- a/src/Services/Payment/Payment.API/Dockerfile
+++ b/src/Services/Payment/Payment.API/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Services/Payment/Payment.API
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile
index 99a31f90b..0da59affa 100644
--- a/src/Services/Webhooks/Webhooks.API/Dockerfile
+++ b/src/Services/Webhooks/Webhooks.API/Dockerfile
@@ -4,14 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
-COPY ["src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj", "src/Services/Webhooks/Webhooks.API/"]
-RUN dotnet restore "src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj"
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR "/src/src/Services/Webhooks/Webhooks.API"
-RUN dotnet build "Webhooks.API.csproj" -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish "Webhooks.API.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile
index d863c9428..4cb62e614 100644
--- a/src/Web/WebMVC/Dockerfile
+++ b/src/Web/WebMVC/Dockerfile
@@ -4,12 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Web/WebMVC
-RUN dotnet restore -nowarn:msb3202,nu1503
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile
index 6ac1a7961..ef0f46c7f 100644
--- a/src/Web/WebSPA/Dockerfile
+++ b/src/Web/WebSPA/Dockerfile
@@ -3,23 +3,33 @@ FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
WORKDIR /app
EXPOSE 80
-FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS dotnet-build
-WORKDIR /src
-
FROM ${NODE_IMAGE} as node-build
WORKDIR /web
COPY src/Web/WebSPA .
RUN npm install
RUN npm run build:prod
-FROM dotnet-build as publish
-WORKDIR /src/src/Web/WebSPA/wwwroot
-COPY --from=node-build /web/wwwroot .
+FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
+COPY --from=node-build /web/wwwroot /src/src/Web/WebSPA/wwwroot/
WORKDIR /src/src/Web/WebSPA
RUN dotnet publish -c Release -o /app
+FROM build AS publish
+
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile
index d8b7c2632..edb691988 100644
--- a/src/Web/WebStatus/Dockerfile
+++ b/src/Web/WebStatus/Dockerfile
@@ -4,13 +4,23 @@ EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
WORKDIR /src/src/Web/WebStatus
-RUN dotnet restore -nowarn:msb3202,nu1503
-RUN dotnet build --no-restore -c Release -o /app
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish --no-restore -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile
index a59042017..0710db058 100644
--- a/src/Web/WebhookClient/Dockerfile
+++ b/src/Web/WebhookClient/Dockerfile
@@ -5,14 +5,23 @@ EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
-COPY ["src/Web/WebhookClient/WebhookClient.csproj", "src/Web/WebhookClient/"]
-RUN dotnet restore "src/Web/WebhookClient/WebhookClient.csproj"
+
+COPY scripts scripts/
+
+COPY src/ApiGateways/*/*.csproj /src/csproj-files/
+COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
+COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
+COPY src/Services/*/*/*.csproj /src/csproj-files/
+COPY src/Web/*/*.csproj /src/csproj-files/
+
+ARG RUN=pwd
+RUN ${RUN}
+
COPY . .
-WORKDIR "/src/src/Web/WebhookClient"
-RUN dotnet build "WebhookClient.csproj" -c Release -o /app
+WORKDIR /src/src/Web/WebhookClient
+RUN dotnet publish -c Release -o /app
FROM build AS publish
-RUN dotnet publish "WebhookClient.csproj" -c Release -o /app
FROM base AS final
WORKDIR /app
diff --git a/src/csproj-files.txt b/src/csproj-files.txt
new file mode 100644
index 000000000..6dc3532d9
--- /dev/null
+++ b/src/csproj-files.txt
@@ -0,0 +1,34 @@
+COPY src/ApiGateways/ApiGw-Base/*.csproj /src/src/ApiGateways/ApiGw-Base/
+COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/*.csproj /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator/
+COPY src/ApiGateways/Web.Bff.Shopping/aggregator/*.csproj /src/src/ApiGateways/Web.Bff.Shopping/aggregator/
+COPY src/BuildingBlocks/EventBus/CommandBus/*.csproj /src/src/BuildingBlocks/EventBus/CommandBus/
+COPY src/BuildingBlocks/EventBus/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/
+COPY src/BuildingBlocks/EventBus/EventBus.Tests/*.csproj /src/src/BuildingBlocks/EventBus/EventBus.Tests/
+COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/*.csproj /src/src/BuildingBlocks/EventBus/EventBusRabbitMQ/
+COPY src/BuildingBlocks/EventBus/EventBusServiceBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBusServiceBus/
+COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/*.csproj /src/src/BuildingBlocks/EventBus/IntegrationEventLogEF/
+COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/*.csproj /src/src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
+COPY src/Services/Basket/Basket.API/*.csproj /src/src/Services/Basket/Basket.API/
+COPY src/Services/Basket/Basket.FunctionalTests/*.csproj /src/src/Services/Basket/Basket.FunctionalTests/
+COPY src/Services/Basket/Basket.UnitTests/*.csproj /src/src/Services/Basket/Basket.UnitTests/
+COPY src/Services/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/
+COPY src/Services/Catalog/Catalog.FunctionalTests/*.csproj /src/src/Services/Catalog/Catalog.FunctionalTests/
+COPY src/Services/Catalog/Catalog.UnitTests/*.csproj /src/src/Services/Catalog/Catalog.UnitTests/
+COPY src/Services/Identity/Identity.API/*.csproj /src/src/Services/Identity/Identity.API/
+COPY src/Services/Location/Locations.API/*.csproj /src/src/Services/Location/Locations.API/
+COPY src/Services/Location/Locations.FunctionalTests/*.csproj /src/src/Services/Location/Locations.FunctionalTests/
+COPY src/Services/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/
+COPY src/Services/Marketing/Marketing.FunctionalTests/*.csproj /src/src/Services/Marketing/Marketing.FunctionalTests/
+COPY src/Services/Ordering/Ordering.API/*.csproj /src/src/Services/Ordering/Ordering.API/
+COPY src/Services/Ordering/Ordering.BackgroundTasks/*.csproj /src/src/Services/Ordering/Ordering.BackgroundTasks/
+COPY src/Services/Ordering/Ordering.Domain/*.csproj /src/src/Services/Ordering/Ordering.Domain/
+COPY src/Services/Ordering/Ordering.FunctionalTests/*.csproj /src/src/Services/Ordering/Ordering.FunctionalTests/
+COPY src/Services/Ordering/Ordering.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/
+COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/
+COPY src/Services/Ordering/Ordering.UnitTests/*.csproj /src/src/Services/Ordering/Ordering.UnitTests/
+COPY src/Services/Payment/Payment.API/*.csproj /src/src/Services/Payment/Payment.API/
+COPY src/Services/Webhooks/Webhooks.API/*.csproj /src/src/Services/Webhooks/Webhooks.API/
+COPY src/Web/WebhookClient/*.csproj /src/src/Web/WebhookClient/
+COPY src/Web/WebMVC/*.csproj /src/src/Web/WebMVC/
+COPY src/Web/WebSPA/*.csproj /src/src/Web/WebSPA/
+COPY src/Web/WebStatus/*.csproj /src/src/Web/WebStatus/
diff --git a/tests-results/basket-test-results.xml b/tests-results/basket-test-results.xml
deleted file mode 100644
index 933ed1b5b..000000000
--- a/tests-results/basket-test-results.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/basket-unit-test-results.xml b/tests-results/basket-unit-test-results.xml
deleted file mode 100644
index c7a6cd004..000000000
--- a/tests-results/basket-unit-test-results.xml
+++ /dev/null
@@ -1,65 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/catalog-test-results.xml b/tests-results/catalog-test-results.xml
deleted file mode 100644
index 73efaeb8f..000000000
--- a/tests-results/catalog-test-results.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/catalog-unit-test-results.xml b/tests-results/catalog-unit-test-results.xml
deleted file mode 100644
index 2bc65d5c9..000000000
--- a/tests-results/catalog-unit-test-results.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/locations-test-results.xml b/tests-results/locations-test-results.xml
deleted file mode 100644
index c8b5e6b82..000000000
--- a/tests-results/locations-test-results.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/marketing-test-results.xml b/tests-results/marketing-test-results.xml
deleted file mode 100644
index 5545febcc..000000000
--- a/tests-results/marketing-test-results.xml
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/ordering-test-results.xml b/tests-results/ordering-test-results.xml
deleted file mode 100644
index 231975d56..000000000
--- a/tests-results/ordering-test-results.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/tests-results/ordering-unit-test-results.xml b/tests-results/ordering-unit-test-results.xml
deleted file mode 100644
index c9f85a60f..000000000
--- a/tests-results/ordering-unit-test-results.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file