Creating a buildx fails when using matrix strategy on self hosted runners
See original GitHub issueBehavior
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
- Set a workflow with whichever trigger you want
- Add a
setup-buildx-action
to the workflow - Parallelize your job with the matrix strategy
- 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:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This works perfect! Thank you @crazy-max 😄
@malkam03 Ok can you try again with
uses: docker/setup-buildx-action@master
?