From 32c2f6236a894534de09ffe847ffff064a7174bd Mon Sep 17 00:00:00 2001 From: tangowithfoxtrot <5676771+tangowithfoxtrot@users.noreply.github.com> Date: Wed, 30 Apr 2025 13:28:09 -0700 Subject: [PATCH] build: we don't need to copy the `.git` dir --- bitwarden_license/src/Scim/Dockerfile | 9 +++------ bitwarden_license/src/Sso/Dockerfile | 3 --- src/Admin/Dockerfile | 1 - src/Api/Dockerfile | 1 - src/Billing/Dockerfile | 1 - src/Events/Dockerfile | 1 - src/EventsProcessor/Dockerfile | 1 - src/Icons/Dockerfile | 1 - src/Identity/Dockerfile | 1 - src/Notifications/Dockerfile | 1 - util/MsSqlMigratorUtility/Dockerfile | 1 - 11 files changed, 3 insertions(+), 18 deletions(-) diff --git a/bitwarden_license/src/Scim/Dockerfile b/bitwarden_license/src/Scim/Dockerfile index 87cfe9cca5..b31336b25b 100644 --- a/bitwarden_license/src/Scim/Dockerfile +++ b/bitwarden_license/src/Scim/Dockerfile @@ -9,11 +9,11 @@ ARG TARGETPLATFORM # Determine proper runtime value for .NET # We put the value in a file to be read by later layers. RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - RID=linux-x64 ; \ + RID=linux-x64 ; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - RID=linux-arm64 ; \ + RID=linux-arm64 ; \ elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \ - RID=linux-arm ; \ + RID=linux-arm ; \ fi \ && echo "RID=$RID" > /tmp/rid.txt @@ -31,8 +31,6 @@ COPY Directory.Build.props . WORKDIR /source/bitwarden_license/src/Scim RUN . /tmp/rid.txt && dotnet restore -r $RID -WORKDIR /source/bitwarden_license/src/Scim - # Copy required project files WORKDIR /source COPY .editorconfig /source @@ -41,7 +39,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ # Build project WORKDIR /source/bitwarden_license/src/Scim diff --git a/bitwarden_license/src/Sso/Dockerfile b/bitwarden_license/src/Sso/Dockerfile index b5ff0dfab1..568c8ccbe1 100644 --- a/bitwarden_license/src/Sso/Dockerfile +++ b/bitwarden_license/src/Sso/Dockerfile @@ -31,8 +31,6 @@ COPY Directory.Build.props . WORKDIR /source/bitwarden_license/src/Sso RUN . /tmp/rid.txt && dotnet restore -r $RID -WORKDIR /source/bitwarden_license/src/Sso - # Copy required project files WORKDIR /source COPY .editorconfig /source @@ -41,7 +39,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ # Build project WORKDIR /source/bitwarden_license/src/Sso diff --git a/src/Admin/Dockerfile b/src/Admin/Dockerfile index f2810c6c81..0919f7bb1f 100644 --- a/src/Admin/Dockerfile +++ b/src/Admin/Dockerfile @@ -62,7 +62,6 @@ COPY util/SqliteMigrations/. ./util/SqliteMigrations/ COPY util/EfShared/. ./util/EfShared/ COPY bitwarden_license/src/Commercial.Core/. ./bitwarden_license/src/Commercial.Core/ COPY bitwarden_license/src/Commercial.Infrastructure.EntityFramework/. ./bitwarden_license/src/Commercial.Infrastructure.EntityFramework/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/Api/Dockerfile b/src/Api/Dockerfile index 6e3ab0e444..0c6959c7ce 100644 --- a/src/Api/Dockerfile +++ b/src/Api/Dockerfile @@ -42,7 +42,6 @@ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ COPY bitwarden_license/src/Commercial.Core/. ./bitwarden_license/src/Commercial.Core/ COPY bitwarden_license/src/Commercial.Infrastructure.EntityFramework/. ./bitwarden_license/src/Commercial.Infrastructure.EntityFramework/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/Billing/Dockerfile b/src/Billing/Dockerfile index d3e4939a44..5b5ac396c5 100644 --- a/src/Billing/Dockerfile +++ b/src/Billing/Dockerfile @@ -38,7 +38,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig . # Build project diff --git a/src/Events/Dockerfile b/src/Events/Dockerfile index 7fd406eeae..a745673e2b 100644 --- a/src/Events/Dockerfile +++ b/src/Events/Dockerfile @@ -38,7 +38,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/EventsProcessor/Dockerfile b/src/EventsProcessor/Dockerfile index 4e9c23ac11..d66c1bf999 100644 --- a/src/EventsProcessor/Dockerfile +++ b/src/EventsProcessor/Dockerfile @@ -39,7 +39,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/Icons/Dockerfile b/src/Icons/Dockerfile index 8b78b8d1f6..d387d34ee1 100644 --- a/src/Icons/Dockerfile +++ b/src/Icons/Dockerfile @@ -37,7 +37,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/Identity/Dockerfile b/src/Identity/Dockerfile index e15c55671a..f4f76df752 100644 --- a/src/Identity/Dockerfile +++ b/src/Identity/Dockerfile @@ -38,7 +38,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/src/Notifications/Dockerfile b/src/Notifications/Dockerfile index e3d0327cee..a588d81a4c 100644 --- a/src/Notifications/Dockerfile +++ b/src/Notifications/Dockerfile @@ -38,7 +38,6 @@ COPY src/Core/. ./src/Core/ COPY src/Infrastructure.Dapper/. ./src/Infrastructure.Dapper/ COPY src/Infrastructure.EntityFramework/. ./src/Infrastructure.EntityFramework/ COPY src/SharedWeb/. ./src/SharedWeb/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project diff --git a/util/MsSqlMigratorUtility/Dockerfile b/util/MsSqlMigratorUtility/Dockerfile index edc202bc93..213364b6c4 100644 --- a/util/MsSqlMigratorUtility/Dockerfile +++ b/util/MsSqlMigratorUtility/Dockerfile @@ -38,7 +38,6 @@ COPY util/MsSqlMigratorUtility/. ./util/MsSqlMigratorUtility/ COPY src/Core/. ./src/Core/ COPY util/Migrator/. ./util/Migrator/ COPY util/Server/. ./util/Server/ -COPY .git/. ./.git/ COPY .editorconfig /source # Build project