From 06018d4080ce0e89a6e3a33126f967cca570b402 Mon Sep 17 00:00:00 2001 From: Miguel Veloso Date: Sat, 13 Apr 2019 08:23:40 +0100 Subject: [PATCH] Streamline Dockerfiles --- Dockerfile-scripts/restore-packages | 2 +- src/ApiGateways/ApiGw-Base/Dockerfile | 31 ++++--------------- .../Mobile.Bff.Shopping/aggregator/Dockerfile | 31 ++++--------------- .../Web.Bff.Shopping/aggregator/Dockerfile | 31 ++++--------------- src/Services/Basket/Basket.API/Dockerfile | 31 ++++--------------- src/Services/Catalog/Catalog.API/Dockerfile | 31 ++++--------------- src/Services/Identity/Identity.API/Dockerfile | 31 ++++--------------- .../Location/Locations.API/Dockerfile | 31 ++++--------------- .../Marketing/Marketing.API/Dockerfile | 31 ++++--------------- src/Services/Ordering/Ordering.API/Dockerfile | 31 ++++--------------- .../Ordering.BackgroundTasks/Dockerfile | 31 ++++--------------- .../Ordering/Ordering.SignalrHub/Dockerfile | 31 ++++--------------- src/Services/Payment/Payment.API/Dockerfile | 31 ++++--------------- src/Services/Webhooks/Webhooks.API/Dockerfile | 31 ++++--------------- src/Web/WebMVC/Dockerfile | 31 ++++--------------- src/Web/WebSPA/Dockerfile | 31 ++++--------------- src/Web/WebStatus/Dockerfile | 31 ++++--------------- src/Web/WebhookClient/Dockerfile | 31 ++++--------------- 18 files changed, 103 insertions(+), 426 deletions(-) diff --git a/Dockerfile-scripts/restore-packages b/Dockerfile-scripts/restore-packages index f0a8623d2..9edc44b03 100644 --- a/Dockerfile-scripts/restore-packages +++ b/Dockerfile-scripts/restore-packages @@ -1,3 +1,3 @@ #!/bin/bash -for f in $(find /src/src -type f -name "*.csproj"); do dotnet restore $f; done +for f in /src/csproj-files/*.csproj; do dotnet restore $f; done diff --git a/src/ApiGateways/ApiGw-Base/Dockerfile b/src/ApiGateways/ApiGw-Base/Dockerfile index 20373e2bf..7404c463c 100644 --- a/src/ApiGateways/ApiGw-Base/Dockerfile +++ b/src/ApiGateways/ApiGw-Base/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/ApiGateways/ApiGw-Base/ -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile index 1e633c2b4..abbf252a7 100644 --- a/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/ApiGateways/Mobile.Bff.Shopping/aggregator -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile index 2a8a7af36..a816091c3 100644 --- a/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile +++ b/src/ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/ApiGateways/Web.Bff.Shopping/aggregator -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Services/Basket/Basket.API/Dockerfile b/src/Services/Basket/Basket.API/Dockerfile index 41f9885d8..1126ab876 100644 --- a/src/Services/Basket/Basket.API/Dockerfile +++ b/src/Services/Basket/Basket.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Basket/Basket.API -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build as unittest WORKDIR /src/src/Services/Basket/Basket.UnitTests diff --git a/src/Services/Catalog/Catalog.API/Dockerfile b/src/Services/Catalog/Catalog.API/Dockerfile index 756ac0020..7542719a4 100644 --- a/src/Services/Catalog/Catalog.API/Dockerfile +++ b/src/Services/Catalog/Catalog.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Catalog/Catalog.API -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 diff --git a/src/Services/Identity/Identity.API/Dockerfile b/src/Services/Identity/Identity.API/Dockerfile index d0ce0bc80..e31d0e6f0 100644 --- a/src/Services/Identity/Identity.API/Dockerfile +++ b/src/Services/Identity/Identity.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Identity/Identity.API -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Services/Location/Locations.API/Dockerfile b/src/Services/Location/Locations.API/Dockerfile index cc631de8e..4bbde3400 100644 --- a/src/Services/Location/Locations.API/Dockerfile +++ b/src/Services/Location/Locations.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Location/Locations.API -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 diff --git a/src/Services/Marketing/Marketing.API/Dockerfile b/src/Services/Marketing/Marketing.API/Dockerfile index 0f061beea..e4e084690 100644 --- a/src/Services/Marketing/Marketing.API/Dockerfile +++ b/src/Services/Marketing/Marketing.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Marketing/Marketing.API -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 diff --git a/src/Services/Ordering/Ordering.API/Dockerfile b/src/Services/Ordering/Ordering.API/Dockerfile index b763f4a4d..7093a8f56 100644 --- a/src/Services/Ordering/Ordering.API/Dockerfile +++ b/src/Services/Ordering/Ordering.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Ordering/Ordering.API -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build as unittest WORKDIR /src/src/Services/Ordering/Ordering.UnitTests diff --git a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile index f742d3d60..a780d6589 100644 --- a/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile +++ b/src/Services/Ordering/Ordering.BackgroundTasks/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Ordering/Ordering.BackgroundTasks -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile index be90a6793..c40b926dc 100644 --- a/src/Services/Ordering/Ordering.SignalrHub/Dockerfile +++ b/src/Services/Ordering/Ordering.SignalrHub/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Ordering/Ordering.SignalrHub -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Services/Payment/Payment.API/Dockerfile b/src/Services/Payment/Payment.API/Dockerfile index 30067579a..a3c2ec684 100644 --- a/src/Services/Payment/Payment.API/Dockerfile +++ b/src/Services/Payment/Payment.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Services/Payment/Payment.API -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Services/Webhooks/Webhooks.API/Dockerfile b/src/Services/Webhooks/Webhooks.API/Dockerfile index 2fb6db415..2c078bffc 100644 --- a/src/Services/Webhooks/Webhooks.API/Dockerfile +++ b/src/Services/Webhooks/Webhooks.API/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR "/src/src/Services/Webhooks/Webhooks.API" -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index 1eedccde3..1a6374223 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Web/WebMVC -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Web/WebSPA/Dockerfile b/src/Web/WebSPA/Dockerfile index fa8a17607..92626c9ba 100644 --- a/src/Web/WebSPA/Dockerfile +++ b/src/Web/WebSPA/Dockerfile @@ -14,37 +14,18 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . COPY --from=node-build /web/wwwroot /src/src/Web/WebSPA/wwwroot/ WORKDIR /src/src/Web/WebSPA -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Web/WebStatus/Dockerfile b/src/Web/WebStatus/Dockerfile index e5a792f28..7cd6fafb6 100644 --- a/src/Web/WebStatus/Dockerfile +++ b/src/Web/WebStatus/Dockerfile @@ -7,36 +7,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Web/WebStatus -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish diff --git a/src/Web/WebhookClient/Dockerfile b/src/Web/WebhookClient/Dockerfile index d7bf4013a..ba0c223e2 100644 --- a/src/Web/WebhookClient/Dockerfile +++ b/src/Web/WebhookClient/Dockerfile @@ -8,36 +8,17 @@ WORKDIR /src COPY Dockerfile-scripts Dockerfile-scripts/ -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/EventBus/*.csproj /src/src/BuildingBlocks/EventBus/EventBus/ -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/Catalog/Catalog.API/*.csproj /src/src/Services/Catalog/Catalog.API/ -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/Marketing/Marketing.API/*.csproj /src/src/Services/Marketing/Marketing.API/ -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.Infrastructure/*.csproj /src/src/Services/Ordering/Ordering.Infrastructure/ -COPY src/Services/Ordering/Ordering.SignalrHub/*.csproj /src/src/Services/Ordering/Ordering.SignalrHub/ -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/ +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/ RUN Dockerfile-scripts/restore-packages COPY . . WORKDIR /src/src/Web/WebhookClient -RUN dotnet build --no-restore -c Release -o /app +RUN dotnet publish -c Release -o /app FROM build AS publish