Commitcbec75e2f3updated `runDocker()` to load plugin-stubs before `processAliases()` was executed. As a result, plugin stubs were considered as "builtin commands", causing the alias verification to fail; Without alias installed: ```bash docker version Client: Version: 22.06.0-beta.0-140-g3dad26ca2.m API version: 1.42 Go version: go1.19.1 Git commit:3dad26ca2Built: Wed Sep 28 22:36:09 2022 OS/Arch: darwin/arm64 Context: default ... ``` After running `docker buildx install`; ```bash ./build/docker buildx install cat ~/.docker/config.json { "aliases": { "builder": "buildx" } } ./build/docker version not allowed to alias with builtin "buildx" as target ``` This patch moves loading the stubs _after_ the call to `processAliases()`, so that verification passes. As an extra precaution, the `processAliases()` function is also updated to exclude plugin-stub commands. Note thatcbec75e2f3also introduced a performance regression, which may be related to the early loading of plugins (and creating stubs); it looks like various other code locations may also be loading plugins, for example `tryPluginRun()` calls `pluginmanager.PluginRunCommand()`, which also traverses plugin directories. We should look under what circumstances the plugin stub-commands are actually needed, and make sure that they're only created in those situations. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Docker CLI
About
This repository is the home of the cli used in the Docker CE and Docker EE products.
Development
docker/cli is developed using Docker.
Build CLI from source:
docker buildx bake
Build binaries for all supported platforms:
docker buildx bake cross
Build for a specific platform:
docker buildx bake --set binary.platform=linux/arm64
Build dynamic binary for glibc or musl:
USE_GLIBC=1 docker buildx bake dynbinary
Run all linting:
docker buildx bake lint shellcheck
Run test:
docker buildx bake test
List all the available targets:
make help
In-container development environment
Start an interactive development environment:
make -f docker.Makefile shell
Legal
Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.
Use and transfer of Docker may be subject to certain restrictions by the United States and other governments.
It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.
For more information, please see https://www.bis.doc.gov
Licensing
docker/cli is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.