feat: add Docker buildx plugin as hard requirement, fixes #8117#8149
Merged
feat: add Docker buildx plugin as hard requirement, fixes #8117#8149
Conversation
9cd05a2 to
ac9a14a
Compare
|
Download the artifacts for this pull request:
See Testing a PR. |
…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]>
440b47c to
69744b4
Compare
stasadev
approved these changes
Feb 17, 2026
Member
stasadev
left a comment
There was a problem hiding this comment.
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
Member
|
I spent a little extra time to make |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Issue
buildxneeds to be explicit and checked #8117Docker 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 dockercheckcommand via shell exec, with no version enforcement.How This PR Solves The Issue
docker/cli/cli-plugins/managerGo package (already a dependency via docker/cli) to discover CLI plugins and their versions viamanager.ListPlugins(), replacing shell-based detection.BuildxVersionConstraint(">= 0.17.0") toDockerVersionMatrix.GetBuildxVersion()andCheckDockerBuildx()inrequirements.go, following the same pattern asCheckDockerCompose().ddev start/ddev restarttime inroot.goPersistentPreRun.docker-buildxversion inddev versionoutput.ddev utility dockercheckto use the new Go-based detection.Manual Testing Instructions
ddev version— should show adocker-buildxrow with the installed versionddev utility dockercheck— should show buildx version and version check resultddev starton any project — should pass buildx check silently when buildx >= 0.17.0 is installedbuildxneeds 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 themTestGetBuildxVersion— verifies a non-empty version string is returned withoutvprefixTestCheckBuildx— verifiesCheckDockerBuildx()passes on the test hostRelease/Deployment Notes
Users without the buildx plugin installed (or with versions < 0.17.0) will see a failure at
ddev start/ddev restarttime with install instructions pointing to https://github.com/docker/buildx#installing.