Skip to content

Conversation

@Ompragash
Copy link
Member

Adds opt-in Docker Buildx Bake support for high-level builds and multi-registry pushes, while maintaining full backward compatibility.

Key Features:

  • Bake Mode: Activated via PLUGIN_BAKE_FILE - runs docker buildx bake instead of docker buildx build
  • Multi-Registry Push: Single bake command pushes to multiple registries in parallel
  • Flexible Options: PLUGIN_BAKE_OPTIONS supports targets, --set overrides, and additional flags (semicolon-delimited)
  • Enhanced Config: PLUGIN_CONFIG now accepts file paths OR JSON content (uses os.Stat detection)

New Inputs:

  • PLUGIN_BAKE_FILE: Path to bake definition file (HCL/JSON/Compose)
  • PLUGIN_BAKE_OPTIONS: Semicolon-delimited bake CLI flags and targets

Backward Compatibility:

  • ✅ All existing functionality unchanged when PLUGIN_BAKE_FILE not set
  • ✅ PLUGIN_CONFIG enhancement maintains JSON content support
  • ✅ Bake and push-only modes are mutually exclusive (with validation)

Benefits:

  • Simplified Pipelines: Replace multiple build+push steps with single bake step
  • Atomic Multi-Registry: All registries get identical image with same digest
  • Better Performance: Parallel pushes handled by buildx
  • Declarative Config: Build configuration in version-controlled bake files

Usage Example

  settings:
    bake_file: docker-bake.hcl
    config: /path/to/docker-config.json
    bake_options: "web;api;--progress=plain"

Fixes: Enables efficient multi-registry workflows and advanced BuildKit features through bake files.

Ompragash and others added 4 commits September 4, 2025 16:01
- Use JSON validation to distinguish between config content and file paths
- Prevents sensitive data exposure in error logs
- Provides clearer, user-friendly error messages
- Maintains full backward compatibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@Ompragash Ompragash merged commit a5ec4f7 into master Sep 9, 2025
9 checks passed
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