Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dockerfiles for copy dependencies in root #306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/ApiGateway/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/

Expand All @@ -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
Expand All @@ -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
Expand Down
15 changes: 7 additions & 8 deletions src/ApiGateway/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/

Expand All @@ -15,18 +18,14 @@ 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

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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions src/Services/Booking/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Services/Booking/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Services/Flight/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Services/Flight/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
9 changes: 5 additions & 4 deletions src/Services/Identity/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand Down
9 changes: 5 additions & 4 deletions src/Services/Identity/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Services/Passenger/Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
8 changes: 4 additions & 4 deletions src/Services/Passenger/dev.Dockerfile
Original file line number Diff line number Diff line change
@@ -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/
Expand All @@ -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

Expand Down
Loading