Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 038b3ca

Browse files
committed
Update Dockerfiles to improve local build time
1 parent ddff0ce commit 038b3ca

File tree

19 files changed

+699
-124
lines changed

19 files changed

+699
-124
lines changed

.dockerignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55
.vs
66
.vscode
77
docker-compose*.yml
8-
docker-compose.dcproj
9-
*.sln
108
*.md
119
hosts
1210
LICENSE
1311
*.testsettings
1412
vsts-docs
15-
test
1613
ServiceFabric
1714
readme
1815
k8s

run-docker-compose-build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$startTime = $(Get-Date)
22

3-
docker-compose build --build-arg RUN=scripts/restore-packages
3+
docker-compose build
44

55
$elapsedTime = $(Get-Date) - $startTime
66

src/ApiGateways/ApiGw-Base/Dockerfile

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,51 @@ EXPOSE 80
55
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
66
WORKDIR /src
77

8-
COPY scripts scripts/
8+
# Keep the project list and command dotnet restore identical in all Dockfiles to maximize image cache utilization
9+
COPY eShopOnContainers-ServicesAndWebApps.sln .
10+
COPY docker-compose.dcproj /src/
11+
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
12+
COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj src/ApiGateways/Mobile.Bff.Shopping/aggregator/
13+
COPY src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj src/ApiGateways/Web.Bff.Shopping/aggregator/
14+
COPY src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj src/BuildingBlocks/Devspaces.Support/
15+
COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/
16+
COPY src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj src/BuildingBlocks/EventBus/EventBus.Tests/
17+
COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/
18+
COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/
19+
COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/
20+
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
21+
COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/
22+
COPY src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj src/Services/Basket/Basket.FunctionalTests/
23+
COPY src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj src/Services/Basket/Basket.UnitTests/
24+
COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/
25+
COPY src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj src/Services/Catalog/Catalog.FunctionalTests/
26+
COPY src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj src/Services/Catalog/Catalog.UnitTests/
27+
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
28+
COPY src/Services/Location/Locations.API/Locations.API.csproj src/Services/Location/Locations.API/
29+
COPY src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj src/Services/Location/Locations.FunctionalTests/
30+
COPY src/Services/Marketing/Marketing.API/Marketing.API.csproj src/Services/Marketing/Marketing.API/
31+
COPY src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj src/Services/Marketing/Marketing.FunctionalTests/
32+
COPY src/Services/Ordering/Ordering.API/Ordering.API.csproj src/Services/Ordering/Ordering.API/
33+
COPY src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj src/Services/Ordering/Ordering.BackgroundTasks/
34+
COPY src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj src/Services/Ordering/Ordering.Domain/
35+
COPY src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj src/Services/Ordering/Ordering.FunctionalTests/
36+
COPY src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj src/Services/Ordering/Ordering.Infrastructure/
37+
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
38+
COPY src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj src/Services/Ordering/Ordering.UnitTests/
39+
COPY src/Services/Payment/Payment.API/Payment.API.csproj src/Services/Payment/Payment.API/
40+
COPY src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj src/Services/Webhooks/Webhooks.API/
41+
COPY src/Web/WebhookClient/WebhookClient.csproj src/Web/WebhookClient/
42+
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
43+
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
44+
COPY src/Web/WebStatus/WebStatus.csproj src/Web/WebStatus/
45+
COPY test/ServicesTests/Application.FunctionalTests/Application.FunctionalTests.csproj test/ServicesTests/Application.FunctionalTests/
46+
COPY test/ServicesTests/LoadTest/LoadTest.csproj test/ServicesTests/LoadTest/
947

10-
COPY src/ApiGateways/*/*.csproj /src/csproj-files/
11-
COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
12-
COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
13-
COPY src/Services/*/*/*.csproj /src/csproj-files/
14-
COPY src/Web/*/*.csproj /src/csproj-files/
48+
RUN dotnet restore eShopOnContainers-ServicesAndWebApps.sln
1549

1650
COPY . .
1751
WORKDIR /src/src/ApiGateways/ApiGw-Base/
18-
RUN dotnet publish -c Release -o /app
52+
RUN dotnet publish --no-restore -c Release -o /app
1953

2054
FROM build AS publish
2155

src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,51 @@ EXPOSE 80
55
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
66
WORKDIR /src
77

8-
COPY scripts scripts/
8+
# Keep the project list and command dotnet restore identical in all Dockfiles to maximize image cache utilization
9+
COPY eShopOnContainers-ServicesAndWebApps.sln .
10+
COPY docker-compose.dcproj /src/
11+
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
12+
COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj src/ApiGateways/Mobile.Bff.Shopping/aggregator/
13+
COPY src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj src/ApiGateways/Web.Bff.Shopping/aggregator/
14+
COPY src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj src/BuildingBlocks/Devspaces.Support/
15+
COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/
16+
COPY src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj src/BuildingBlocks/EventBus/EventBus.Tests/
17+
COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/
18+
COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/
19+
COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/
20+
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
21+
COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/
22+
COPY src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj src/Services/Basket/Basket.FunctionalTests/
23+
COPY src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj src/Services/Basket/Basket.UnitTests/
24+
COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/
25+
COPY src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj src/Services/Catalog/Catalog.FunctionalTests/
26+
COPY src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj src/Services/Catalog/Catalog.UnitTests/
27+
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
28+
COPY src/Services/Location/Locations.API/Locations.API.csproj src/Services/Location/Locations.API/
29+
COPY src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj src/Services/Location/Locations.FunctionalTests/
30+
COPY src/Services/Marketing/Marketing.API/Marketing.API.csproj src/Services/Marketing/Marketing.API/
31+
COPY src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj src/Services/Marketing/Marketing.FunctionalTests/
32+
COPY src/Services/Ordering/Ordering.API/Ordering.API.csproj src/Services/Ordering/Ordering.API/
33+
COPY src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj src/Services/Ordering/Ordering.BackgroundTasks/
34+
COPY src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj src/Services/Ordering/Ordering.Domain/
35+
COPY src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj src/Services/Ordering/Ordering.FunctionalTests/
36+
COPY src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj src/Services/Ordering/Ordering.Infrastructure/
37+
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
38+
COPY src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj src/Services/Ordering/Ordering.UnitTests/
39+
COPY src/Services/Payment/Payment.API/Payment.API.csproj src/Services/Payment/Payment.API/
40+
COPY src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj src/Services/Webhooks/Webhooks.API/
41+
COPY src/Web/WebhookClient/WebhookClient.csproj src/Web/WebhookClient/
42+
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
43+
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
44+
COPY src/Web/WebStatus/WebStatus.csproj src/Web/WebStatus/
45+
COPY test/ServicesTests/Application.FunctionalTests/Application.FunctionalTests.csproj test/ServicesTests/Application.FunctionalTests/
46+
COPY test/ServicesTests/LoadTest/LoadTest.csproj test/ServicesTests/LoadTest/
947

10-
COPY src/ApiGateways/*/*.csproj /src/csproj-files/
11-
COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
12-
COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
13-
COPY src/Services/*/*/*.csproj /src/csproj-files/
14-
COPY src/Web/*/*.csproj /src/csproj-files/
48+
RUN dotnet restore eShopOnContainers-ServicesAndWebApps.sln
1549

1650
COPY . .
1751
WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator
18-
RUN dotnet publish -c Release -o /app
52+
RUN dotnet publish --no-restore -c Release -o /app
1953

2054
FROM build AS publish
2155

src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,51 @@ EXPOSE 80
55
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
66
WORKDIR /src
77

8-
COPY scripts scripts/
8+
# Keep the project list and command dotnet restore identical in all Dockfiles to maximize image cache utilization
9+
COPY eShopOnContainers-ServicesAndWebApps.sln .
10+
COPY docker-compose.dcproj /src/
11+
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
12+
COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj src/ApiGateways/Mobile.Bff.Shopping/aggregator/
13+
COPY src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj src/ApiGateways/Web.Bff.Shopping/aggregator/
14+
COPY src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj src/BuildingBlocks/Devspaces.Support/
15+
COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/
16+
COPY src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj src/BuildingBlocks/EventBus/EventBus.Tests/
17+
COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/
18+
COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/
19+
COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/
20+
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
21+
COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/
22+
COPY src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj src/Services/Basket/Basket.FunctionalTests/
23+
COPY src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj src/Services/Basket/Basket.UnitTests/
24+
COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/
25+
COPY src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj src/Services/Catalog/Catalog.FunctionalTests/
26+
COPY src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj src/Services/Catalog/Catalog.UnitTests/
27+
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
28+
COPY src/Services/Location/Locations.API/Locations.API.csproj src/Services/Location/Locations.API/
29+
COPY src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj src/Services/Location/Locations.FunctionalTests/
30+
COPY src/Services/Marketing/Marketing.API/Marketing.API.csproj src/Services/Marketing/Marketing.API/
31+
COPY src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj src/Services/Marketing/Marketing.FunctionalTests/
32+
COPY src/Services/Ordering/Ordering.API/Ordering.API.csproj src/Services/Ordering/Ordering.API/
33+
COPY src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj src/Services/Ordering/Ordering.BackgroundTasks/
34+
COPY src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj src/Services/Ordering/Ordering.Domain/
35+
COPY src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj src/Services/Ordering/Ordering.FunctionalTests/
36+
COPY src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj src/Services/Ordering/Ordering.Infrastructure/
37+
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
38+
COPY src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj src/Services/Ordering/Ordering.UnitTests/
39+
COPY src/Services/Payment/Payment.API/Payment.API.csproj src/Services/Payment/Payment.API/
40+
COPY src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj src/Services/Webhooks/Webhooks.API/
41+
COPY src/Web/WebhookClient/WebhookClient.csproj src/Web/WebhookClient/
42+
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
43+
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
44+
COPY src/Web/WebStatus/WebStatus.csproj src/Web/WebStatus/
45+
COPY test/ServicesTests/Application.FunctionalTests/Application.FunctionalTests.csproj test/ServicesTests/Application.FunctionalTests/
46+
COPY test/ServicesTests/LoadTest/LoadTest.csproj test/ServicesTests/LoadTest/
947

10-
COPY src/ApiGateways/*/*.csproj /src/csproj-files/
11-
COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
12-
COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
13-
COPY src/Services/*/*/*.csproj /src/csproj-files/
14-
COPY src/Web/*/*.csproj /src/csproj-files/
48+
RUN dotnet restore eShopOnContainers-ServicesAndWebApps.sln
1549

1650
COPY . .
1751
WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator
18-
RUN dotnet publish -c Release -o /app
52+
RUN dotnet publish --no-restore -c Release -o /app
1953

2054
FROM build AS publish
2155

src/Services/Basket/Basket.API/Dockerfile

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,51 @@ EXPOSE 80
55
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
66
WORKDIR /src
77

8-
COPY scripts scripts/
8+
# Keep the project list and command dotnet restore identical in all Dockfiles to maximize image cache utilization
9+
COPY eShopOnContainers-ServicesAndWebApps.sln .
10+
COPY docker-compose.dcproj /src/
11+
COPY src/ApiGateways/ApiGw-Base/OcelotApiGw.csproj src/ApiGateways/ApiGw-Base/
12+
COPY src/ApiGateways/Mobile.Bff.Shopping/aggregator/Mobile.Shopping.HttpAggregator.csproj src/ApiGateways/Mobile.Bff.Shopping/aggregator/
13+
COPY src/ApiGateways/Web.Bff.Shopping/aggregator/Web.Shopping.HttpAggregator.csproj src/ApiGateways/Web.Bff.Shopping/aggregator/
14+
COPY src/BuildingBlocks/Devspaces.Support/Devspaces.Support.csproj src/BuildingBlocks/Devspaces.Support/
15+
COPY src/BuildingBlocks/EventBus/EventBus/EventBus.csproj src/BuildingBlocks/EventBus/EventBus/
16+
COPY src/BuildingBlocks/EventBus/EventBus.Tests/EventBus.Tests.csproj src/BuildingBlocks/EventBus/EventBus.Tests/
17+
COPY src/BuildingBlocks/EventBus/EventBusRabbitMQ/EventBusRabbitMQ.csproj src/BuildingBlocks/EventBus/EventBusRabbitMQ/
18+
COPY src/BuildingBlocks/EventBus/EventBusServiceBus/EventBusServiceBus.csproj src/BuildingBlocks/EventBus/EventBusServiceBus/
19+
COPY src/BuildingBlocks/EventBus/IntegrationEventLogEF/IntegrationEventLogEF.csproj src/BuildingBlocks/EventBus/IntegrationEventLogEF/
20+
COPY src/BuildingBlocks/WebHostCustomization/WebHost.Customization/WebHost.Customization.csproj src/BuildingBlocks/WebHostCustomization/WebHost.Customization/
21+
COPY src/Services/Basket/Basket.API/Basket.API.csproj src/Services/Basket/Basket.API/
22+
COPY src/Services/Basket/Basket.FunctionalTests/Basket.FunctionalTests.csproj src/Services/Basket/Basket.FunctionalTests/
23+
COPY src/Services/Basket/Basket.UnitTests/Basket.UnitTests.csproj src/Services/Basket/Basket.UnitTests/
24+
COPY src/Services/Catalog/Catalog.API/Catalog.API.csproj src/Services/Catalog/Catalog.API/
25+
COPY src/Services/Catalog/Catalog.FunctionalTests/Catalog.FunctionalTests.csproj src/Services/Catalog/Catalog.FunctionalTests/
26+
COPY src/Services/Catalog/Catalog.UnitTests/Catalog.UnitTests.csproj src/Services/Catalog/Catalog.UnitTests/
27+
COPY src/Services/Identity/Identity.API/Identity.API.csproj src/Services/Identity/Identity.API/
28+
COPY src/Services/Location/Locations.API/Locations.API.csproj src/Services/Location/Locations.API/
29+
COPY src/Services/Location/Locations.FunctionalTests/Locations.FunctionalTests.csproj src/Services/Location/Locations.FunctionalTests/
30+
COPY src/Services/Marketing/Marketing.API/Marketing.API.csproj src/Services/Marketing/Marketing.API/
31+
COPY src/Services/Marketing/Marketing.FunctionalTests/Marketing.FunctionalTests.csproj src/Services/Marketing/Marketing.FunctionalTests/
32+
COPY src/Services/Ordering/Ordering.API/Ordering.API.csproj src/Services/Ordering/Ordering.API/
33+
COPY src/Services/Ordering/Ordering.BackgroundTasks/Ordering.BackgroundTasks.csproj src/Services/Ordering/Ordering.BackgroundTasks/
34+
COPY src/Services/Ordering/Ordering.Domain/Ordering.Domain.csproj src/Services/Ordering/Ordering.Domain/
35+
COPY src/Services/Ordering/Ordering.FunctionalTests/Ordering.FunctionalTests.csproj src/Services/Ordering/Ordering.FunctionalTests/
36+
COPY src/Services/Ordering/Ordering.Infrastructure/Ordering.Infrastructure.csproj src/Services/Ordering/Ordering.Infrastructure/
37+
COPY src/Services/Ordering/Ordering.SignalrHub/Ordering.SignalrHub.csproj src/Services/Ordering/Ordering.SignalrHub/
38+
COPY src/Services/Ordering/Ordering.UnitTests/Ordering.UnitTests.csproj src/Services/Ordering/Ordering.UnitTests/
39+
COPY src/Services/Payment/Payment.API/Payment.API.csproj src/Services/Payment/Payment.API/
40+
COPY src/Services/Webhooks/Webhooks.API/Webhooks.API.csproj src/Services/Webhooks/Webhooks.API/
41+
COPY src/Web/WebhookClient/WebhookClient.csproj src/Web/WebhookClient/
42+
COPY src/Web/WebMVC/WebMVC.csproj src/Web/WebMVC/
43+
COPY src/Web/WebSPA/WebSPA.csproj src/Web/WebSPA/
44+
COPY src/Web/WebStatus/WebStatus.csproj src/Web/WebStatus/
45+
COPY test/ServicesTests/Application.FunctionalTests/Application.FunctionalTests.csproj test/ServicesTests/Application.FunctionalTests/
46+
COPY test/ServicesTests/LoadTest/LoadTest.csproj test/ServicesTests/LoadTest/
947

10-
COPY src/ApiGateways/*/*.csproj /src/csproj-files/
11-
COPY src/ApiGateways/*/*/*.csproj /src/csproj-files/
12-
COPY src/BuildingBlocks/*/*/*.csproj /src/csproj-files/
13-
COPY src/Services/*/*/*.csproj /src/csproj-files/
14-
COPY src/Web/*/*.csproj /src/csproj-files/
48+
RUN dotnet restore eShopOnContainers-ServicesAndWebApps.sln
1549

1650
COPY . .
1751
WORKDIR /src/src/Services/Basket/Basket.API
18-
RUN dotnet publish -c Release -o /app
52+
RUN dotnet publish --no-restore -c Release -o /app
1953

2054
FROM build as unittest
2155
WORKDIR /src/src/Services/Basket/Basket.UnitTests

0 commit comments

Comments
 (0)