You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure when this broke (did not yet do a bisect), but I noticed that if the ~/.docker/config.json contains an alias for builder (which happens after running docker buildx install), the CLI is broken;
docker version
not allowed to alias with builtin"buildx" as target
Reproduce
make -f docker.Makefile binary
Without alias installed:
rm ~/.docker/config.json
./build/docker version
Client:
Version: 22.06.0-beta.0-140-g3dad26ca2.m
API version: 1.42
Go version: go1.19.1
Git commit: 3dad26ca2
Built: Wed Sep 28 22:36:09 2022
OS/Arch: darwin/arm64
Context: default
...
After running docker buildx install;
./build/docker buildx install
cat ~/.docker/config.json
{
"auths": {},
"aliases": {
"builder": "buildx"
}
}
./build/docker version
not allowed to alias with builtin"buildx" as target
The error occurs in this part of the code inside processAliases();
returnargs, osArgs, errors.Errorf("not allowed to alias with builtin %q as target", v)
}
Because the cmd.Find("buildx")) returns a cmd. From a quick test the cmd it finds may be the "stub" command we create for plugins; when disabling the buildx plugin (renaming the file), the problem goes away;
mv /usr/local/lib/docker/cli-plugins/docker-buildx /usr/local/lib/docker/cli-plugins/docker-buildx-disabled
./build/docker version
Client:
Version: 22.06.0-beta.0-140-g3dad26ca2.m
API version: 1.42
Go version: go1.19.1
Git commit: 3dad26ca2
Built: Wed Sep 28 22:36:09 2022
OS/Arch: darwin/arm64
Context: default
...
Expected behavior
No response
docker version
current master (built from https://github.com/docker/cli/commit/3dad26ca2d418092b8c4e01b03d0455d583bec86)
Client:
Version: 22.06.0-beta.0-140-g3dad26ca2.m
API version: 1.42
Go version: go1.19.1
Git commit: 3dad26ca2
Built: Wed Sep 28 22:36:09 2022
OS/Arch: darwin/arm64
Context: default
docker info
not relevant
Additional Info
No response
The text was updated successfully, but these errors were encountered:
@crazy-max PTAL; perhaps you have an idea how we can detect if a command is a "plugin" or not (haven't looked closely yet; perhaps we have annotations we can use)
Description
Not sure when this broke (did not yet do a bisect), but I noticed that if the
~/.docker/config.json
contains an alias forbuilder
(which happens after runningdocker buildx install
), the CLI is broken;Reproduce
Without alias installed:
rm ~/.docker/config.json ./build/docker version Client: Version: 22.06.0-beta.0-140-g3dad26ca2.m API version: 1.42 Go version: go1.19.1 Git commit: 3dad26ca2 Built: Wed Sep 28 22:36:09 2022 OS/Arch: darwin/arm64 Context: default ...
After running
docker buildx install
;The error occurs in this part of the code inside
processAliases()
;cli/cmd/docker/aliases.go
Lines 29 to 31 in c780f7c
Because the
cmd.Find("buildx"))
returns acmd
. From a quick test thecmd
it finds may be the "stub" command we create for plugins; when disabling thebuildx
plugin (renaming the file), the problem goes away;Expected behavior
No response
docker version
docker info
Additional Info
No response
The text was updated successfully, but these errors were encountered: