53 lines
2.8 KiB
Docker
Raw Normal View History

2019-03-21 16:38:01 +01:00
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2 AS base
2016-10-17 20:10:18 -07:00
WORKDIR /app
EXPOSE 80
2019-03-21 16:38:01 +01:00
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build
WORKDIR /src
2019-04-12 19:45:45 +01:00
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/
RUN Dockerfile-scripts/restore-packages
COPY . .
2018-01-04 14:29:17 -08:00
WORKDIR /src/src/Services/Basket/Basket.API
RUN dotnet build --no-restore -c Release -o /app
2018-11-29 10:08:34 +01:00
FROM build as unittest
2018-11-20 10:58:12 +01:00
WORKDIR /src/src/Services/Basket/Basket.UnitTests
2019-04-12 19:45:45 +01:00
FROM build as functionaltest
WORKDIR /src/src/Services/Basket/Basket.FunctionalTests
FROM build AS publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "Basket.API.dll"]