Alano Terblanche
2b56b66b10
cli/command: remove interactive login prompt from docker push/pull
...
This patch removes the interactive prompts from `docker push/pull`.
The prompt would only execute on a response status code 403 from the registry
after trying the value set in `RegistryAuth`. Docker Hub could return 404
instead or 429, which would never execute the prompt.
The UX regarding the prompt is also questionable since the user might
not actually want to authenticate with a registry and the CLI could fail fast
instead. The user can always run `docker login` or set the `DOCKER_AUTH_CONFIG`
environment variable to get authenticated.
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2025-07-16 08:43:35 +02:00
Sebastiaan van Stijn
eebf6824fc
cli/command/plugin: remove errdefs uses
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-05-16 20:30:00 +02:00
Sebastiaan van Stijn
d0d8d1dc72
cli/internal/jsonstream: move to top-level "internal"
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-05-06 20:04:21 +02:00
Sebastiaan van Stijn
b37d84fd10
cli/command: move prompt utilities to separate package
...
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-04-11 12:23:16 +02:00
Sebastiaan van Stijn
53aed6119b
cli/command/plugin: minor cleanups: use Println, rename vars
...
- use Println to print newline instead of custom format
- use dockerCLI with Go's standard camelCase casing.
- suppress some errors to make my IDE and linters happier
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2025-02-03 12:18:11 +01:00
Alano Terblanche
91adb70d6b
pkg/command: wrap jsonmessage.DisplayJSONMessagesStream with go context
...
Allows for the `jsonmessage.DisplayJSONMessagesStream` function
to correctly return when the context is cancelled with the appropriate
reason (`ctx.Error()`) instead of just a nil error.
Follow-up to https://github.com/docker/cli/commit/30a73ff19c407eee75de489355154ce1f35231a8
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
Co-authored-by: Paweł Gronowski <pawel.gronowski@docker.com >
2025-01-20 16:36:11 +01:00
Alano Terblanche
910d5d0247
chore: remove backticks and resolve linting issues
...
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2024-04-02 15:54:29 +02:00
Alano Terblanche
7c722c08d0
feat: standardize error for prompt
...
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2024-03-26 14:11:55 +01:00
Alano Terblanche
10bf91a02d
fix: cli prompt termination exit code
...
Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com >
2024-03-04 15:26:17 +01:00
Brian Goff
5400a48aaf
Plumb contexts through commands
...
This is to prepare for otel support.
Signed-off-by: Brian Goff <cpuguy83@gmail.com >
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-12-12 22:30:16 +01:00
Sebastiaan van Stijn
fb2ba5d63b
migrate reference github.com/distribution/reference
...
The "reference" package was moved to a separate module, which was extracted
from https://github.com/distribution/distribution/commit/b9b19409cf458dcb9e1253ff44ba75bd0620faa6
Signed-off-by: Sebastiaan van Stijn <github@gone.nl >
2023-09-05 17:53:20 +02:00
Vincent Demeester
6e21829af4
Refactor content_trust cli/flags handling
...
Remove the global variable used. Allows easier unit testing.
Signed-off-by: Vincent Demeester <vincent@sbr.pm >
2018-03-08 15:00:43 -05:00
Daniel Nephin
c0d004f7cf
Update gometalinter
...
and enable the new WarnUnmatchedDirective to warn if a nolint is unnecessary.
remove some unnecessary nolint
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-10-26 12:21:02 -04:00
Daniel Nephin
4205416c9b
Update code for upstream cobra
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-10-25 14:49:26 -04:00
Daniel Nephin
10641c2aae
Update imports.
...
Signed-off-by: Daniel Nephin <dnephin@docker.com >
2017-04-17 18:07:56 -04:00
Daniel Nephin
1630fc40f8
Import docker/docker/cli
...
Signed-off-by: Daniel Nephin <dnephin@gmail.com >
2017-04-17 17:40:59 -04:00