Skip to content

Add Docker arm64 builds #5529

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

Open
wants to merge 119 commits into
base: main
Choose a base branch
from
Open

Add Docker arm64 builds #5529

wants to merge 119 commits into from

Conversation

vgrassia
Copy link
Member

@vgrassia vgrassia commented Mar 19, 2025

📔 Objective

This PR modifies all of the Dockerfiles in this repository to use multi-stage builds. This is very similar to the logic used to build the container image for Bitwarden Unified. Making this change enables us to build for multiple architectures. I have specified the architectures linux/amd64, linux/arm64, and linux/arm/v7 in this PR.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@vgrassia vgrassia self-assigned this Mar 19, 2025
Copy link
Contributor

github-actions bot commented Mar 19, 2025

Logo
Checkmarx One – Scan Summary & Detailscd3f999b-03c6-400d-ad0a-e055c83ea429

New Issues (5)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Api/AdminConsole/Controllers/GroupsController.cs: 164
detailsMethod Put at line 164 of /src/Api/AdminConsole/Controllers/GroupsController.cs gets a parameter from a user request from model. This parameter val...
Attack Vector
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 94
detailsMethod Put at line 94 of /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs gets a parameter from a user request from model. This param...
Attack Vector
MEDIUM CSRF /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs: 104
detailsMethod Patch at line 104 of /bitwarden_license/src/Scim/Controllers/v2/GroupsController.cs gets a parameter from a user request from model. This pa...
Attack Vector
MEDIUM CSRF /src/Api/AdminConsole/Public/Controllers/GroupsController.cs: 133
detailsMethod Put at line 133 of /src/Api/AdminConsole/Public/Controllers/GroupsController.cs gets a parameter from a user request from model. This parame...
Attack Vector
LOW Missing_CSP_Header /src/Core/MailTemplates/Handlebars/SecurityTasksNotification.html.hbs: 21
detailsA Content Security Policy is not explicitly defined within the web-application.
Attack Vector
Fixed Issues (4)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 93
MEDIUM CSRF /src/Api/KeyManagement/Controllers/AccountsKeyManagementController.cs: 93
LOW Use_Of_Hardcoded_Password /src/Core/Constants.cs: 173
LOW Use_Of_Hardcoded_Password /src/Core/Constants.cs: 172

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 44.99%. Comparing base (b309de1) to head (997d9b8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5529   +/-   ##
=======================================
  Coverage   44.99%   44.99%           
=======================================
  Files        1562     1562           
  Lines       71469    71469           
  Branches     6399     6399           
=======================================
  Hits        32158    32158           
  Misses      37945    37945           
  Partials     1366     1366           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checkmarx One found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@vgrassia vgrassia changed the title Add docker arm64 builds Add Docker arm64 builds Mar 27, 2025
@vgrassia vgrassia marked this pull request as ready for review March 27, 2025 19:20
@vgrassia vgrassia requested review from a team as code owners March 27, 2025 19:20
Copy link
Contributor

@addisonbeck addisonbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT, though I am not a SME on our Dockerfiles. Those CVE alerts seem out of place and are clearly unrelated. Any idea what's triggering them @vgrassia ?

@vgrassia
Copy link
Member Author

vgrassia commented Apr 3, 2025

LGMT, though I am not a SME on our Dockerfiles. Those CVE alerts seem out of place and are clearly unrelated. Any idea what's triggering them @vgrassia ?

I have no idea why those CVE alerts are happening. They all point to the first line in the Dockerfiles which is a stylized comment block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants