Has anyone gotten docker buildx working on github ...
# general
p
Has anyone gotten docker buildx working on github actions? I've gotten it working locally, but when I run it on GHA I get this error
Copy code
ERROR: Cache export feature is currently not supported for docker driver. Please switch to a different driver (eg. "docker buildx create --use")
I have attempted to install buildx like so:
Copy code
- name: Set up QEMU
      uses: docker/setup-qemu-action@v3
    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
b
We used to use docker buildx + Github Actions together, but without Pants. One thing we found was that the emulation from QEMU ended up making the image build process insanely slow (10+ minutes as compared to 2-3 using Pants). I’ll see if I can find the code though
My version was using
v2
of the action and not `v3`:
Copy code
- name: Set up QEMU
  uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
  uses: docker/setup-buildx-action@v2
But it did work at the time without issue 🤷
p
Ah, I found this change that seems to have fixed my error above:
Copy code
- name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v3
      with:
        install: true
This seems to add to .docker/config.json to force buildx
Did you find a workaroiud for qemu being slow?
b
We ended up using a hosted provider, https://depot.dev/ instead. They run build workers inside AWS on different architectures to avoid the emulation
p
presumably this is configured with the build_hosts in the toml file?
b
No, this isn’t a cache or remote execution and it doesn’t follow REAPI - it’s a substitute for using
docker buildx
and
setup-buildx-action
. It’s only useful for building Docker images
If you’re interested in Depot, would encourage reading the docs and especially the part about their Github Actions integration - it should allow you to replace the snippet you posted in the OP