Skip to content

Conversation

@rjaegers
Copy link
Member

@rjaegers rjaegers commented Jun 21, 2025

🚀 Hey, I have created a Pull Request

Description of changes

This PR contains a couple of (minor) image build improvements:

  • Reduced the number of COPY's to zero by bind-mounting necessary build-context files in the RUN steps
  • Cache mounted apt cache to negate the need to remove the apt cache and apt lists
  • Cache mounted /tmp and /var/log to prevent unnecessary updates to those paths
  • Removed a shellcheck violation (should not source files)
  • Removed the cleanup of sqlite3, as it is not even installed

✔️ Checklist

  • I have followed the contribution guidelines for this repository
  • I have added tests for new behavior, and have not broken any existing tests
  • I have added or updated relevant documentation
  • I have verified that all added components are accounted for in the SBOM

Copilot AI review requested due to automatic review settings June 21, 2025 13:17
@rjaegers rjaegers requested a review from a team as a code owner June 21, 2025 13:17
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

The PR removes unnecessary COPY statements by replacing them with bind mounts in the Dockerfiles to streamline file management during the build process.

  • Updated the Rust Dockerfile to use a bind mount for the apt requirements file and cleaned up redundant environment variable declarations.
  • Updated the C++ Dockerfile to use bind mounts for both apt requirements and Python requirements, along with the clang apt requirements file.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.devcontainer/rust/Dockerfile Replaces copy statements with bind mount; fixes redundant ENV usage and an incorrect file path.
.devcontainer/cpp/Dockerfile Replaces copy statements with bind mount for apt and pip requirements and clang configuration.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2025

Test Results

 4 files  ±0   4 suites  ±0   2m 26s ⏱️ +4s
30 tests ±0  30 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit d4dc944. ± Comparison against base commit b7ed2c4.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2025

🦙 MegaLinter status: ⚠️ WARNING

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ ACTION actionlint 18 0 0 0.49s
✅ DOCKERFILE hadolint 2 0 0 0.85s
✅ GHERKIN gherkin-lint 2 0 0 0.94s
✅ JSON npm-package-json-lint yes no no 0.43s
✅ JSON prettier 16 1 0 0 0.57s
✅ JSON v8r 16 0 0 7.54s
✅ MARKDOWN markdownlint 9 0 0 0 0.95s
✅ MARKDOWN markdown-table-formatter 9 0 0 0 0.26s
✅ REPOSITORY checkov yes no no 17.02s
✅ REPOSITORY gitleaks yes no no 0.41s
✅ REPOSITORY git_diff yes no no 0.01s
⚠️ REPOSITORY grype yes no 2 23.23s
✅ REPOSITORY secretlint yes no no 0.94s
✅ REPOSITORY syft yes no no 1.86s
✅ REPOSITORY trivy yes no no 6.83s
✅ REPOSITORY trivy-sbom yes no no 0.26s
✅ REPOSITORY trufflehog yes no no 3.65s
✅ SPELL lychee 63 0 0 1.9s
✅ YAML prettier 24 0 0 0 0.94s
✅ YAML v8r 24 0 0 6.66s
✅ YAML yamllint 24 0 0 0.82s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2025

📦 Container Size Analysis

Comparing ghcr.io/philips-software/amp-devcontainer-rust:edge to ghcr.io/philips-software/amp-devcontainer-rust:pr-833

📈 Size Comparison Table

OS/Platform Previous Size Current Size Change Trend
linux/amd64 522.71M 489.22M -33.50M (-6.41%) 🔽
linux/arm64 441.22M 441.18M -39.35K (-0.01%) 🔽

@github-actions
Copy link
Contributor

github-actions bot commented Jun 21, 2025

📦 Container Size Analysis

Comparing ghcr.io/philips-software/amp-devcontainer-cpp:edge to ghcr.io/philips-software/amp-devcontainer-cpp:pr-833

📈 Size Comparison Table

OS/Platform Previous Size Current Size Change Trend
linux/amd64 673.57M 673.46M -116.81K (-0.02%) 🔽
linux/arm64 656.71M 656.60M -117.56K (-0.02%) 🔽

rjaegers added 2 commits June 21, 2025 16:36
Don't source /etc/os-release but grep the value we want from it
@rjaegers rjaegers changed the title chore: remove unnecessary copy statements chore: image build improvements Jun 21, 2025
@sonarqubecloud
Copy link

@rjaegers rjaegers merged commit 62a2660 into main Jun 26, 2025
35 checks passed
@rjaegers rjaegers deleted the feature/reduce-number-of-unnecessary-copies branch June 26, 2025 16:52
@github-actions
Copy link
Contributor

Pull Request Report (#833)

Static measures

Description Value
Number of added lines 39
Number of deleted lines 28
Number of changed files 3
Number of commits 13
Number of reviews 2
Number of comments (w/o review comments) 5
Number of reviews that contains a comment to resolve 1
Number of reviews that requested a change from the author 0
Number of reviews that approved the Pull Request 1
Get the total number of participants of a Pull Request 5

Time related measures

Description Value
PR lead time (from creation to close of PR) 5.1 Days
Time that was spend on the branch before the PR was created 18 Sec
Time that was spend on the branch before the PR was merged 5.1 Days
Time to merge after last review 2.4 Days

Status check related measures

Description Value
Total runtime for last status check run (Workflow for PR) 26.3 Min
Total time spend in last status check run on PR 8.7 Min

@github-actions
Copy link
Contributor

🎉 Hooray! The changes in this pull request went live with the release of v6.2.0 🎉

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.

3 participants