mirror of
https://github.com/meysamhadeli/booking-microservices.git
synced 2026-04-11 02:20:20 +08:00
Merge pull request #306 from meysamhadeli/chore/update-dockerfiles-for-copy-dependencies-in-root
chore: update dockerfiles for copy dependencies in root
This commit is contained in:
commit
092ecdef72
@ -1,8 +1,11 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /src
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /src
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/ApiGateway/src/ApiGateway.csproj ./ApiGateway/src/
|
||||
|
||||
@ -14,17 +17,13 @@ RUN dotnet restore ./ApiGateway/src/ApiGateway.csproj
|
||||
COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/ApiGateway/src ./ApiGateway/src/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
RUN ls
|
||||
RUN dotnet build -c Release --no-restore ./ApiGateway/src/ApiGateway.csproj
|
||||
|
||||
WORKDIR /src/ApiGateway/src
|
||||
WORKDIR /ApiGateway/src
|
||||
|
||||
# Publish project to output folder
|
||||
# and no build, as we did it already
|
||||
@ -33,7 +32,7 @@ RUN dotnet publish -c Release --no-build -o out
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /app
|
||||
WORKDIR /
|
||||
COPY --from=builder /src/ApiGateway/src/out .
|
||||
|
||||
ENV ASPNETCORE_URLS https://*:443, http://*:80
|
||||
|
||||
@ -1,8 +1,11 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /src
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /src
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/ApiGateway/src/ApiGateway.csproj ./ApiGateway/src/
|
||||
|
||||
@ -15,10 +18,6 @@ RUN --mount=type=cache,id=gateway_nuget,target=/root/.nuget/packages \
|
||||
COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/ApiGateway/src ./ApiGateway/src/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
@ -26,7 +25,7 @@ RUN ls
|
||||
RUN --mount=type=cache,id=gateway_nuget,target=/root/.nuget/packages \
|
||||
dotnet build -c Release --no-restore ./ApiGateway/src/ApiGateway.csproj
|
||||
|
||||
WORKDIR /src/ApiGateway/src
|
||||
WORKDIR /ApiGateway/src
|
||||
|
||||
# Publish project to output folder
|
||||
# and no build, as we did it already
|
||||
@ -36,7 +35,7 @@ RUN --mount=type=cache,id=gateway_nuget,target=/root/.nuget/packages \
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /app
|
||||
WORKDIR /
|
||||
COPY --from=builder /src/ApiGateway/src/out .
|
||||
|
||||
ENV ASPNETCORE_URLS https://*:443, http://*:80
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Booking/src/Booking/Booking.csproj ./Services/Booking/src/Booking/
|
||||
@ -15,10 +19,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Booking/src/Booking/ ./Services/Booking/src/Booking/
|
||||
COPY ./src/Services/Booking/src/Booking.Api/ ./Services/Booking/src/Booking.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Booking/src/Booking/Booking.csproj ./Services/Booking/src/Booking/
|
||||
@ -16,10 +20,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Booking/src/Booking/ ./Services/Booking/src/Booking/
|
||||
COPY ./src/Services/Booking/src/Booking.Api/ ./Services/Booking/src/Booking.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Flight/src/Flight/Flight.csproj ./Services/Flight/src/Flight/
|
||||
@ -15,10 +19,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Flight/src/Flight/ ./Services/Flight/src/Flight/
|
||||
COPY ./src/Services/Flight/src/Flight.Api/ ./Services/Flight/src/Flight.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Flight/src/Flight/Flight.csproj ./Services/Flight/src/Flight/
|
||||
@ -16,10 +20,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Flight/src/Flight/ ./Services/Flight/src/Flight/
|
||||
COPY ./src/Services/Flight/src/Flight.Api/ ./Services/Flight/src/Flight.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -2,6 +2,11 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Identity/src/Identity/Identity.csproj ./Services/Identity/src/Identity/
|
||||
COPY ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj ./Services/Identity/src/Identity.Api/
|
||||
@ -14,10 +19,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Identity/src/Identity/ ./Services/Identity/src/Identity/
|
||||
COPY ./src/Services/Identity/src/Identity.Api/ ./Services/Identity/src/Identity.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -2,6 +2,11 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
|
||||
# Setup working directory for the project
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Identity/src/Identity/Identity.csproj ./Services/Identity/src/Identity/
|
||||
COPY ./src/Services/Identity/src/Identity.Api/Identity.Api.csproj ./Services/Identity/src/Identity.Api/
|
||||
@ -15,10 +20,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Identity/src/Identity/ ./Services/Identity/src/Identity/
|
||||
COPY ./src/Services/Identity/src/Identity.Api/ ./Services/Identity/src/Identity.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Passenger/src/Passenger/Passenger.csproj ./Services/Passenger/src/Passenger/
|
||||
@ -15,10 +19,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Passenger/src/Passenger/ ./Services/Passenger/src/Passenger/
|
||||
COPY ./src/Services/Passenger/src/Passenger.Api/ ./Services/Passenger/src/Passenger.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
|
||||
WORKDIR /
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Setup working directory for the project
|
||||
COPY ./src/BuildingBlocks/BuildingBlocks.csproj ./BuildingBlocks/
|
||||
COPY ./src/Services/Passenger/src/Passenger/Passenger.csproj ./Services/Passenger/src/Passenger/
|
||||
@ -16,10 +20,6 @@ COPY ./src/BuildingBlocks ./BuildingBlocks/
|
||||
COPY ./src/Services/Passenger/src/Passenger/ ./Services/Passenger/src/Passenger/
|
||||
COPY ./src/Services/Passenger/src/Passenger.Api/ ./Services/Passenger/src/Passenger.Api/
|
||||
|
||||
COPY ./.editorconfig ./
|
||||
COPY ./global.json ./
|
||||
COPY ./Directory.Build.props ./
|
||||
|
||||
# Build project with Release configuration
|
||||
# and no restore, as we did it already
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user