Skip to content

Setup Docker Buildx (Advanced)

Actions

About

Production-grade Docker Buildx with full caching (GHA, registry, local)
V1
Latest
StarΒ (1)

πŸš€ Setup Docker Buildx (Advanced)

image

Stop wasting CI minutes.
Make Docker builds 2–5x faster with built-in caching and production-grade defaults.

License Build Speed Caching GitHub stars


✨ Features

  • βœ… GHA Cache (zero-config, fastest for CI)
  • πŸ“¦ Registry Cache (shared across teams)
  • πŸ’Ύ Local Cache (perfect for self-hosted runners)
  • βš™οΈ Built-in QEMU (multi-arch out of the box)
  • πŸ” Idempotent builder creation (safe for reruns)
  • 🌍 Remote builder support (k8s / TCP ready)
  • 🧠 Smart defaults (works even with minimal inputs)

πŸ”₯ Why this exists

Most Buildx setups:

  • Require multiple actions
  • Have fragile caching
  • Break on reruns

This action is designed for real-world pipelines:

Faster builds. Fewer failures. More control.


🎬 See It In Action (30 sec)

Setup Buildx Demo
Advanced Way To Setup Docker Buildx πŸš€


πŸ“¦ Basic Usage

- name: Setup Buildx
  uses: anantacloud-actions/setup-buildx-action@v1

⚑ With Multi-Arch Support

  uses: anantacloud-actions/setup-buildx-action@v1
  with:
    platforms: linux/amd64,linux/arm64

πŸ” Caching Strategies

🧠 GHA Cache (Recommended)

  with:
    cache-type: gha

πŸ“¦ Registry Cache (Team Sharing)

  with:
    cache-type: registry
    cache-image: myrepo/buildx-cache:latest

πŸ’Ύ Local Cache (Self-hosted runners)

  with:
    cache-type: local
    cache-dir: /tmp/.buildx-cache

πŸ—οΈ Build Example (with cache)

- name: Build Image
  run: |
    docker buildx build \
      --cache-from "$BUILDX_CACHE_FROM" \
      --cache-to "$BUILDX_CACHE_TO" \
      --platform linux/amd64,linux/arm64 \
      -t myapp:latest .

πŸ“ˆ Performance Impact

Typical improvements:

  • ⏱ 60–90% faster builds
  • πŸ’° Reduced CI costs
  • πŸ” Reliable reruns (no flaky builders)

🀝 Contributing

git clone https://github.com/anantacloud-actions/setup-buildx-action
cd setup-buildx-action
npm install
npm run build

Open a PR πŸš€

πŸ“œ License

MIT

⭐ Support

If this saves you time, give it a star ⭐ It helps others discover it.

Setup Docker Buildx (Advanced) is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Production-grade Docker Buildx with full caching (GHA, registry, local)
V1
Latest

Setup Docker Buildx (Advanced) is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.