Skip to content

Conversation

@swelborn
Copy link
Member

@swelborn swelborn commented Sep 2, 2025

when pushing the these before, the registry was not getting their manifests properly. exporting these with OCI-mediatypes true produces a good manifest. this will eventually be the default, see: moby/buildkit#6171 and moby/buildkit#6095

also add a --dry-run option

Generated

This pull request adds a new --dry-run option to the operators/bake.sh script, allowing users to preview the Docker build commands without executing them. It also refactors how build arguments are assembled and ensures consistent use of provenance and registry output settings.

New dry-run functionality:

  • Added a DRY_RUN flag and a --dry-run command-line option to the script, enabling users to print the build commands instead of running them. [1] [2]
  • Modified build command construction so that if DRY_RUN is enabled, the --print flag is included, causing Docker to output the build plan rather than execute it. [1] [2]

Build command improvements:

  • Refactored the placement of the --provenance=false flag so it is always included, regardless of whether a specific target is set.
  • Ensured that images are always pushed to the registry using OCI media types by adding --set "*.output=type=registry,oci-mediatypes=true" to the command.

this will just print things out instead of running
when we were pushing these before, the registry was not getting their
manifests properly. exporting these with `OCI-mediatypes` true produces
a good manifest. this will eventually be the default, see
moby/buildkit#6171 and
moby/buildkit#6095
@swelborn swelborn requested a review from cjh1 September 2, 2025 18:34
Copy link
Collaborator

@cjh1 cjh1 left a comment

Choose a reason for hiding this comment

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

LGTM

@swelborn swelborn merged commit 11a5203 into main Sep 5, 2025
25 checks passed
@swelborn swelborn deleted the fixup-operator-builds branch September 5, 2025 18:55
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