Skip to content

chore: add dynamic annotations to Dockerfile #1629

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

Merged
merged 1 commit into from
Apr 6, 2025

Conversation

philprime
Copy link
Contributor

@philprime philprime commented Apr 6, 2025

  • Replaced deprecated org.label-schema.* labels with OCI-standard org.opencontainers.image.* annotations in the Dockerfile
  • Consolidated label declarations into a single multi-line instruction for better readability
  • Added org.opencontainers.image.licenses="Apache-2.0" label to properly document licensing
  • Created a hooks/build script for Docker Hub automated builds that:
    • Dynamically sets org.opencontainers.image.revision from the Git commit hash
    • Sets org.opencontainers.image.created using the current build date in RFC 3339 format
    • Uses SOURCE_BRANCH to set the org.opencontainers.image.version label

Reasoning

This PR updates our Docker image metadata to follow Open Containers Initiative (OCI) standards, which have superseded the older org.label-schema convention. The dynamic labels set through the build hook enhance traceability by recording when images were built and from which exact Git commit, improving our build audit trail and making image identification more precise.

@philprime philprime self-assigned this Apr 6, 2025
Copy link

codecov bot commented Apr 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 6.34%. Comparing base (f87b4e6) to head (fe1d484).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1629   +/-   ##
=====================================
  Coverage   6.34%   6.34%           
=====================================
  Files        304     304           
  Lines       6238    6238           
  Branches     678     678           
=====================================
  Hits         396     396           
  Misses      5836    5836           
  Partials       6       6           
Flag Coverage Δ
unittests 6.34% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@philprime philprime merged commit 56dd2ed into main Apr 6, 2025
8 checks passed
@philprime philprime deleted the philprime/docker-annotations branch April 6, 2025 22:23
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.

1 participant