Unable to perform cloud build from Azure Devops

Expected behavior

Can use Docker Cloud Build to build my images.

Actual behavior

When I try to create and use the buildx cloud builder I receive an error; failed to find driver “cloud”

Additional Information

I have a pipeline in Azure Devops.
I am using the following bash script to ensure the latest version of buildx x is intalled

# Get download link for latest buildx binary. Set $ARCH to the CPU architecture (e.g. amd64, arm64)
ARCH=amd64
BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$ARCH\"))")

# Download docker buildx with Build Cloud support
mkdir -vp ~/.docker/cli-plugins/
curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL
chmod a+x ~/.docker/cli-plugins/docker-buildx

If I use the buildx version command, it shows I have version 0.16.2 installed, which appears to be the latest version.

The build host is a Linux Ubuntu system, one of the Microsoft build agents.

Steps to reproduce the behavior

  1. Create new build pipeline
  2. Use a Docker command to login to Docker.
  3. Use the following bash script to create the builder in the decker cloud build.
# Get download link for latest buildx binary. Set $ARCH to the CPU architecture (e.g. amd64, arm64)
ARCH=amd64
BUILDX_URL=$(curl -s https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/buildx-lab-releases.json | jq -r ".latest.assets[] | select(endswith(\"linux-$ARCH\"))")

# Download docker buildx with Build Cloud support
mkdir -vp ~/.docker/cli-plugins/
curl --silent -L --output ~/.docker/cli-plugins/docker-buildx $BUILDX_URL
chmod a+x ~/.docker/cli-plugins/docker-buildx

docker buildx version

docker buildx create --use --driver cloud org/name
  1. The script runs, but fails on the last command, with the error reported; failed to find driver “cloud”

Does the same script work manually or do you get the same error as from Azure Devops?

The same script does not throw any errors on a local Ubuntu server.

The script i am running is from the docker website, and it copies the latest buildx from the github repo.

I have also run the buildx version command and it reports the latest version.

I can find no post specifically about installing cloud drivers. The instructions on the docker cloud build says i only need to install the latest buildx.

You replied to a spammer’s post. so I deleted the post and suspended the user.

I was not really available in the last couple of days, but if you still have the issue, you could try running docker info and check the Path of the buildx plugin. these plugins could be loaded from multiple locations and it is possible that the loaded plugin is not what you instaled. If I remember correctly, I saw a bug months or years ago when the path in the docker info was actually not what Docker used, so you can delete the plugin you installed, run docker info, see what it wants to load, delete that too, and when docker info does not show the buildx plugin at all, install your version.

I meant to test it on the same server where Azure Devops would execute the commands. If it works directly without Azure Devops on the same server, then the question is how Azure Devops runs the command. On behalf of what user. Does it run commands as root or as the same user with which you tried?