Skip to content
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

ci/test-images: print docker context #894

Merged
merged 9 commits into from
Mar 28, 2025

Conversation

alxndrsn
Copy link
Contributor

@alxndrsn alxndrsn commented Feb 13, 2025

This commit adds visibility into the docker context used for building container images.

This should make it easier to spot:

  • unwanted files creeping into docker images
  • context bloat

The script can also be run locally to understand differences between local and CI docker contexts.

What has been done to verify that this works as intended?

Run locally & in CI.

Why is this the best possible solution? Were any other approaches considered?

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Should not affect users.

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • branched off and targeted the next branch OR only changed documentation/infrastructure (master is stable and used in production)
  • verified that any code or assets from external sources are properly credited in comments or that everything is internally sourced

This commit adds visibility into the docker context used for building container images.

While the docker context is built via a blacklist-based `.dockerignore`, this should make it easier to spot:

* unwanted files creeping into docker images
* context bloat
@matthew-white
Copy link
Member

I mentioned this at #738 (comment), but I think I'm probably not the best person to review the script in this PR. I'm thinking that @sadiqkhoja or @lognaturel would be in a better position to take a look.

@sadiqkhoja sadiqkhoja self-requested a review February 28, 2025 20:18
Copy link
Contributor

@sadiqkhoja sadiqkhoja left a comment

Choose a reason for hiding this comment

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

This is super useful and clever 👏 and should be publish somewhere globally

@alxndrsn alxndrsn requested a review from sadiqkhoja March 27, 2025 06:54
@alxndrsn alxndrsn merged commit aa0d827 into getodk:next Mar 28, 2025
4 checks passed
@alxndrsn alxndrsn deleted the surface-docker-context branch March 28, 2025 06:26
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