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
cli-plugins: include plugin metadata in User-Agent
Add support to the `cli/command` package to accept a custom User
Agent to pass to the underlying client.
Use said support to automatically append CLI plugin-specific info
(name & version) to the `User-Agent` value.
For example, for a hypothetical CLI plugin named `mycmd` with
version `1.0.0` would become `docker-cli-plugin-mycmd/1.0.0`.
The `docker-cli-plugin-` prefix is added automatically for
clarity.
This is used as the `UpstreamClient` portion of the `User-Agent`
when the Moby daemon makes requests.
For example, pushing and pulling images with Compose might result
in the registry seeing a `User-Agent` value of:
```
docker/24.0.7 go/go1.20.10 git-commit/311b9ff kernel/6.5.13-linuxkit os/linux arch/arm64 UpstreamClient(docker-cli-plugin-compose/v2.24.0)
```
Signed-off-by: Milas Bowman <milas.bowman@docker.com>
0 commit comments