Skip to content

Comments

feat: add Docker buildx plugin as hard requirement, fixes #8117#8149

Merged
rfay merged 4 commits intoddev:mainfrom
rfay:20260316_rfay_buildx_check
Feb 19, 2026
Merged

feat: add Docker buildx plugin as hard requirement, fixes #8117#8149
rfay merged 4 commits intoddev:mainfrom
rfay:20260316_rfay_buildx_check

Conversation

@rfay
Copy link
Member

@rfay rfay commented Feb 16, 2026

The Issue

Docker Compose now requires the buildx plugin (>= 0.17.0) per docker/compose#13295. DDEV depends on docker-compose and buildx but previously only checked for buildx in the diagnostic ddev utility dockercheck command via shell exec, with no version enforcement.

How This PR Solves The Issue

  • Uses the docker/cli/cli-plugins/manager Go package (already a dependency via docker/cli) to discover CLI plugins and their versions via manager.ListPlugins(), replacing shell-based detection.
  • Adds BuildxVersionConstraint (">= 0.17.0") to DockerVersionMatrix.
  • Adds GetBuildxVersion() and CheckDockerBuildx() in requirements.go, following the same pattern as CheckDockerCompose().
  • Checks buildx at ddev start/ddev restart time in root.go PersistentPreRun.
  • Shows docker-buildx version in ddev version output.
  • Updates ddev utility dockercheck to use the new Go-based detection.

Manual Testing Instructions

  1. ddev version — should show a docker-buildx row with the installed version
  2. ddev utility dockercheck — should show buildx version and version check result
  3. ddev start on any project — should pass buildx check silently when buildx >= 0.17.0 is installed
  4. Check situation in DDEV + docker-compose dependence on buildx needs to be explicit and checked #8117 where docker-buildx was missing, but we got farther than we should have. Why was that?

Automated Testing Overview

Added three tests in pkg/dockerutil/requirements_test.go:

  • TestGetCLIPlugins — verifies CLI plugins are discovered and buildx is among them
  • TestGetBuildxVersion — verifies a non-empty version string is returned without v prefix
  • TestCheckBuildx — verifies CheckDockerBuildx() passes on the test host

Release/Deployment Notes

Users without the buildx plugin installed (or with versions < 0.17.0) will see a failure at ddev start/ddev restart time with install instructions pointing to https://github.com/docker/buildx#installing.

@rfay rfay requested a review from a team as a code owner February 16, 2026 22:29
@github-actions github-actions bot added dependencies Pull requests that update a dependency file enhancement labels Feb 16, 2026
@rfay rfay force-pushed the 20260316_rfay_buildx_check branch from 9cd05a2 to ac9a14a Compare February 16, 2026 22:29
@github-actions
Copy link

github-actions bot commented Feb 16, 2026

@rfay rfay requested a review from a team as a code owner February 16, 2026 22:43
rfay and others added 2 commits February 16, 2026 20:20
…skip buildkite]

- Fixes ddev#8117

Docker Compose now requires the buildx plugin (>= 0.17.0) per
docker/compose#13295. DDEV depends on docker-compose and buildx but
previously only checked for buildx in the diagnostic
`ddev utility dockercheck` command via shell exec, with no version
enforcement.

- Uses the `docker/cli/cli-plugins/manager` Go package (already a
  dependency via docker/cli) to discover CLI plugins and their versions
  via `manager.ListPlugins()`, replacing shell-based detection.
- Adds `BuildxVersionConstraint` (">= 0.17.0") to `DockerVersionMatrix`.
- Adds `GetBuildxVersion()` and `CheckDockerBuildx()` in requirements.go,
  following the same pattern as `CheckDockerCompose()`.
- Checks buildx at `ddev start`/`ddev restart` time in root.go
  `PersistentPreRun`.
- Shows `docker-buildx` version in `ddev version` output.
- Updates `ddev utility dockercheck` to use the new Go-based detection.

1. `ddev version` — should show a `docker-buildx` row with the version
2. `ddev utility dockercheck` — should show buildx version and check result
3. `ddev start` on any project — should pass buildx check silently

Added `TestGetCLIPlugins`, `TestGetBuildxVersion`, and `TestCheckBuildx`
tests in `pkg/dockerutil/requirements_test.go`.

Users without the buildx plugin installed (or with versions < 0.17.0)
will see a failure at `ddev start`/`ddev restart` time with install
instructions.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@rfay rfay force-pushed the 20260316_rfay_buildx_check branch from 440b47c to 69744b4 Compare February 17, 2026 03:20
Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

My changes to show buildx path:

$ ddev utility dockercheck  
Docker platform: linux-docker 
docker buildx version 0.31.1 (plugin path: /usr/lib/docker/cli-plugins/docker-buildx)
...

Testing:

# how I downgrade it on Arch-based Linux
$ sudo downgrade docker-buildx

$ ddev start
Docker buildx check failed: docker buildx version 0.16.2 (plugin path: /usr/lib/docker/cli-plugins/docker-buildx) does not meet the requirement ">= 0.17.0": 0.16.2 is less than 0.17.0.
Please update buildx: https://github.com/docker/buildx#installing
# remove it ignoring all dependencies
$ sudo pacman -Rdd docker-buildx

$ ddev start
Docker buildx check failed: docker buildx plugin is required but not found: docker CLI plugin "buildx" not found.
Please install buildx: https://github.com/docker/buildx#installing

@stasadev
Copy link
Member

stasadev commented Feb 17, 2026

I spent a little extra time to make ddev utility dockercheck more friendly so that it doesn't fail immediately without checking for everything:

$ ddev utility dockercheck    
Docker platform: linux-docker 
Docker buildx version check: compose build requires buildx 0.17.0 or later.
Installed docker buildx: 0.16.2 (plugin path: /usr/lib/docker/cli-plugins/docker-buildx)
Please update buildx: https://github.com/docker/buildx#installing 
Using Docker context: default 
Using Docker host: unix:///var/run/docker.sock 
TLS not configured (no DOCKER_TLS_VERIFY or DOCKER_TLS) 
docker-compose: v5.0.2 
Docker version: 29.2.1 
Docker API version: 1.53 
Able to run simple container that mounts a volume. 
Able to use internet inside container. 
Skipping buildx test due to earlier buildx version check error. 
Docker authentication is configured correctly 
Docker provider checks completed with warnings. Please address the issues above.

@rfay rfay merged commit 733e30b into ddev:main Feb 19, 2026
36 checks passed
@rfay rfay deleted the 20260316_rfay_buildx_check branch February 19, 2026 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DDEV + docker-compose dependence on buildx needs to be explicit and checked

2 participants