question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating a buildx fails when using matrix strategy on self hosted runners

See original GitHub issue

Behavior

When creating a builder instance using GitHub’s matrix strategy to build multiple images in parallel the Creating a new builder instance action step fails with an error that looks related to the naming strategy used to create new builders:

📣 Buildx version: 0.4.2
🔨 Creating a new builder instance
  /usr/bin/docker buildx create --name builder-build-linux-images-2 --driver docker-container --driver-opt env.http_proxy=***** --driver-opt env.https_proxy=***** --driver-opt image=******* --buildkitd-flags --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --use
  existing instance for builder-build-linux-images-2 but no append mode, specify --node to make changes for existing instances
  Error: The process '/usr/bin/docker' failed with exit code 1

Probably related to this line?

Steps to reproduce this issue

  1. Set a workflow with whichever trigger you want
  2. Add a setup-buildx-action to the workflow
  3. Parallelize your job with the matrix strategy
  4. Run on multiple self-hosted runners on the same server

Expected behavior

The action should assign unique names for the builders

Actual behavior

If the builder is being instantiated with the matrix strategy some of the builders will have the same name

Configuration

  • Repository URL (if public): Private repo
  • Build URL (if public): Private repo
name: Main-CI

on:
  push:
    branches: [main]
jobs:
  build-linux-images:
    runs-on: [self-hosted, linux]
    strategy:
      matrix:
        include:
          - package: package1
            directory: docker/linux/package1
          - package: package2
            directory: docker/linux/package2
          - package: package3
            directory: docker/linux/package3
          - package: package4
            directory: docker/linux/package4
    steps:
      -
        uses: actions/checkout@v2
      -
        name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
malkam03commented, Jan 4, 2021

This works perfect! Thank you @crazy-max 😄

0reactions
crazy-maxcommented, Jan 4, 2021

@malkam03 Ok can you try again with uses: docker/setup-buildx-action@master?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Actions Tutorial and Examples - Codefresh
Learn to create your first GitHub Actions Workflow in our tutorial, and see code examples: building Python project, pushing Docker image, and testing...
Read more >
How to cache Docker files across self-hosted runners in ...
What I have found is that all of the Docker layers are getting pulled down with each matrix run. So if I have...
Read more >
Adding AArch64 to your GitHub CI with GitHub Actions and ...
In this blog, Dave Neary walks through using a custom runner on an Ampere A1 instance on Oracle Cloud to build and test...
Read more >
Jobs in Azure Pipelines and TFS - Microsoft Learn
Use demands with self-hosted agents to specify what capabilities an agent must ... Example jobs that build in parallel (no dependencies):.
Read more >
Parallel all the things. Parallel executions with GitHub Actions
build : runs-on: ubuntu-latest strategy: matrix: ... of parallel jobs, such as the case when self-hosted runners are limited in number.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found