Skip to content

Commit

Permalink
fix: add Directory.Build.props file to Dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis committed Oct 23, 2023
1 parent 7e5b84d commit bc2b2dc
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 10 deletions.
3 changes: 1 addition & 2 deletions AdminUi/src/AdminUi/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build

WORKDIR /src
COPY ["Directory.Build.props", "."]
COPY ["AdminUi/src/AdminUi/AdminUi.csproj", "AdminUi/src/AdminUi/"]
COPY ["AdminUi/src/AdminUi.Infrastructure/AdminUi.Infrastructure.csproj", "AdminUi/src/AdminUi.Infrastructure/"]
COPY ["AdminUi/src/AdminUi.Infrastructure.Database.SqlServer/AdminUi.Infrastructure.Database.SqlServer.csproj", "AdminUi/src/AdminUi.Infrastructure.Database.SqlServer/"]
Expand Down
3 changes: 1 addition & 2 deletions Modules/Devices/src/Devices.AdminCli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.

FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Devices/src/Devices.AdminCli/Devices.AdminCli.csproj", "Modules/Devices/src/Devices.AdminCli/"]
COPY ["Modules/Devices/src/Devices.Infrastructure/Devices.Infrastructure.csproj", "Modules/Devices/src/Devices.Infrastructure/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down
3 changes: 2 additions & 1 deletion Modules/Files/src/Files.Jobs.SanityCheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Files/src/Files.Jobs.SanityCheck/Files.Jobs.SanityCheck.csproj", "Modules/Files/src/Files.Jobs.SanityCheck/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand All @@ -30,4 +31,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Files.Jobs.SanityCheck.dll"]
ENTRYPOINT ["dotnet", "Files.Jobs.SanityCheck.dll"]
3 changes: 2 additions & 1 deletion Modules/Messages/src/Messages.Jobs.SanityCheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Messages/src/Messages.Jobs.SanityCheck/Messages.Jobs.SanityCheck.csproj", "Modules/Messages/src/Messages.Jobs.SanityCheck/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down Expand Up @@ -32,4 +33,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Messages.Jobs.SanityCheck.dll"]
ENTRYPOINT ["dotnet", "Messages.Jobs.SanityCheck.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Relationships/src/Relationships.Jobs.SanityCheck.RelationshipChange/Relationships.Jobs.SanityCheck.RelationshipChange.csproj", "Modules/Relationships/src/Relationships.Jobs.SanityCheck.RelationshipChange/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down Expand Up @@ -32,4 +33,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Relationships.Jobs.SanityCheck.RelationshipChange.dll"]
ENTRYPOINT ["dotnet", "Relationships.Jobs.SanityCheck.RelationshipChange.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Relationships/src/Relationships.Jobs.SanityCheck.RelationshipTemplate/Relationships.Jobs.SanityCheck.RelationshipTemplate.csproj", "Modules/Relationships/src/Relationships.Jobs.SanityCheck.RelationshipTemplate/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down Expand Up @@ -32,4 +33,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Relationships.Jobs.SanityCheck.RelationshipTemplate.dll"]
ENTRYPOINT ["dotnet", "Relationships.Jobs.SanityCheck.RelationshipTemplate.dll"]
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Synchronization/src/Synchronization.Jobs.SanityCheck/Synchronization.Jobs.SanityCheck.csproj", "Modules/Synchronization/src/Synchronization.Jobs.SanityCheck/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down Expand Up @@ -31,4 +32,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Synchronization.Jobs.SanityCheck.dll"]
ENTRYPOINT ["dotnet", "Synchronization.Jobs.SanityCheck.dll"]
3 changes: 2 additions & 1 deletion Modules/Tokens/src/Tokens.Jobs.SanityCheck/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src

COPY ["Directory.Build.props", "."]
COPY ["Modules/Tokens/src/Tokens.Jobs.SanityCheck/Tokens.Jobs.SanityCheck.csproj", "Modules/Tokens/src/Tokens.Jobs.SanityCheck/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Application.Abstractions/BuildingBlocks.Application.Abstractions.csproj", "BuildingBlocks/src/BuildingBlocks.Application.Abstractions/"]
COPY ["BuildingBlocks/src/BuildingBlocks.Domain/BuildingBlocks.Domain.csproj", "BuildingBlocks/src/BuildingBlocks.Domain/"]
Expand Down Expand Up @@ -31,4 +32,4 @@ RUN dotnet publish /property:UseAppHost=false /property:WarningLevel=0 --configu
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Tokens.Jobs.SanityCheck.dll"]
ENTRYPOINT ["dotnet", "Tokens.Jobs.SanityCheck.dll"]

0 comments on commit bc2b2dc

Please sign in to comment.