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.

buildx build fails with error `error: no valid drivers found:` for buildx version `0.5.0`

See original GitHub issue

Behaviour

When the github action is used as follows:

        uses: docker/setup-buildx-action@v1
        with:
          version: latest

i.e with the latest version of buildx (0.5.0), the builds are failing with error. Ref

error: no valid drivers found: invalid driver option platform for docker-container driver
make: *** [docker.buildx] Error 1

This is the command that we executing and giving the above error

	export DOCKER_CLI_EXPERIMENTAL=enabled
	@if ! docker buildx ls | grep -q container-builder; then\
		docker buildx create --platform ${PLATFORMS} --name container-builder --use;\
	fi
	@docker buildx build --platform ${PLATFORMS} \
		-t "$(DOCKERX_IMAGE_NAME)" ${DBUILD_ARGS} -f $(PWD)/build/$(COMPONENT)/Dockerfile \
		. ${PUSH_ARG}

Steps to reproduce this issue

  1. Use setup-build-action github action with latest buildx version (0.5.0)
  2. Execute the following commands
if ! docker buildx ls | grep -q container-builder; then\
		docker buildx create --platform ${PLATFORMS} --name container-builder --use;\
fi
docker buildx build --platform ${PLATFORMS} \
		-t "$(DOCKERX_IMAGE_NAME)" ${DBUILD_ARGS} -f $(PWD)/build/$(COMPONENT)/Dockerfile \
		. ${PUSH_ARG}

Expected behaviour

Tell us what should happen

The build process should continue without an error

Actual behaviour

Tell us what happens instead errors out with

error: no valid drivers found: invalid driver option platform for docker-container driver

Configuration

name: ci

on: ['push']

jobs:
  ndm-daemonset:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
        with:
          platforms: all

      - name: Set up Docker Buildx
        id: buildx
        uses: docker/setup-buildx-action@v1
        with:
          version: latest

      - name: Build Image
        env:
          IMG_RESULT: cache
        run: make docker.buildx.ndm

Logs

Download the log file of your build and attach it to this issue. logs_428.zip

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
macjlcommented, Dec 30, 2020

The problem came when docker-ce has been updated to v20.10.1. It included buildx v0.5.0, that have this bug. It would be nice to publish a newer version of docker-ce whith buildx 0.5.1.

3reactions
tiborvasscommented, Dec 15, 2020

Closing, as v0.5.1 has been released https://github.com/docker/buildx/releases/tag/v0.5.1 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: multiple platforms feature is currently not supported for ...
1. When running the following: To start and run application locally for development: docker buildx build --platform linux/amd64 -f Dockerfile ...
Read more >
rpc error: code = unknown desc = failed to solve with frontend ...
Troubleshooting. I copied a standard template from the readme but for me it throws an error. Behaviour. Error thrown on build and publish...
Read more >
ERROR: failed commit on ref "manifest-sha256:xxx": invalid ...
I have a react app and I'm trying to set up ci/cd for this application. I'm getting an error like this in GitHub...
Read more >
How I built ARM based Docker Images for Raspberry Pi using ...
In addition, buildx supports new features not yet available for regular docker build like building manifest lists, distributed caching, ...
Read more >
Docker executor - GitLab Docs
ERROR : Build failed: Error: image registry.tld/my/image:latest not found. When using the always pull policy in GitLab Runner versions older than v1.8 ...
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