Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: append builder #115

Closed
febus982 opened this issue Nov 18, 2021 · 5 comments · Fixed by #165
Closed

Feature request: append builder #115

febus982 opened this issue Nov 18, 2021 · 5 comments · Fixed by #165

Comments

@febus982
Copy link

febus982 commented Nov 18, 2021

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)

@crazy-max
Copy link
Member

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

@baschny
Copy link

baschny commented Jan 18, 2022

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.

@baschny
Copy link

baschny commented Jan 19, 2022

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

@sinwoobang
Copy link

@baschny You saved my time. Thanks a lot.

@crazy-max
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants