setup-buildx-action
setup-buildx-action copied to clipboard
Feature request: append builder
There are certain scenarios where QEMU performance is simply terrible.
A much performant approach is to use multiple native buildx ~builders~ nodes.
We can already do it using a bash script :
- name: Set up Docker Buildx
id: builder
uses: docker/setup-buildx-action@v1
- name: Append kubernetes buildx builder
shell: bash
run: |
docker buildx create --append --name ${{ steps.builder.outputs.name }} \
--driver kubernetes \
--platform linux/arm64 \
--driver-opt nodeselector=kubernetes.io/arch=arm64
Would it be possible to introduce an append
boolean parameter? Eventually it could be an append_to
accepting a step id (or the builder instance name from the output)
@febus982 Sgtm. I think instead of a boolean parameter for append
, it should be the name of the builder we want to append to. We should also have a platform
input if we want to restrict a specific node.
Great idea. I would use that to append another remote "node" (i.e. an AWS graviton instance for example to build my ARM images) accesible via SSH, like:
-
name: "Set up Docker Buildx"
uses: docker/setup-buildx-action@v1
- name: "Append ARM buildx builder from AWS"
shell: bash
run: |
docker buildx create --append --name ${{ steps.builder.outputs.name }} \
--node aws_graviton \
--platform linux/arm64 \
ssh://[email protected]
So having options to do that in the docker/setup-buildx-action
directly without requiring an additional shell step would be cool.
I created an action out of it for our particular use-case (should also work for the kubernetes case). It also loads an SSH key before if we need that.
https://github.com/marketplace/actions/append-buildx-nodes
@baschny You saved my time. Thanks a lot.
You can now append nodes to existing builder, see https://github.com/docker/setup-buildx-action/blob/master/docs/advanced/append-nodes.md for more info.