Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

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

About

⚡ Supercharge Docker builds with Buildx + smart caching (GHA, registry, local). Faster CI, fewer failures, zero guesswork.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages