Commit Graph

15 Commits

Author SHA1 Message Date
Tonis Tiigi 147c7135b0
simplify signal handling for cobra context
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-01-19 17:18:42 -08:00
Laura Brehm 650a7af0ae
cobra/commands: cancel command context on signal
See https://github.com/docker/cli/pull/4599 and
https://github.com/docker/cli/pull/4769.

Since we switched to using the cobra command context instead of
`appcontext`, we need to set up the signal handling that was being
provided by `appcontext`, as well as configuring the context with
the OTEL tracing utilities also used by `appcontext`.

This commit introduces `cobrautil.ConfigureContext` which implements
the pre-existing signal handling logic from `appcontext` and cancels
the command's context when a signal is received, as well as doing
the relevant OTEL config.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-01-19 16:30:52 -08:00
Laura Brehm 4f738020fd
deps: remove `appcontext`, use `cmd.Context`
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-01-19 16:29:12 -08:00
CrazyMax 8a02cf8717
cli: set default completion
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-11 11:32:48 +02:00
CrazyMax e7b5ee7518
mutualize builder logic
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-12-06 12:13:41 +01:00
Justin Chadwell 04b44b3a89 imagetools: respect --builder flag
The --builder flag was being ignored by imagetools because of pointer
problems. Essentially, because the root cmds aren't parsed immediately,
we need to pass a pointer to the builder string so that it can be
updated before the RunE function gets called.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2022-04-13 14:36:48 +01:00
CrazyMax 20a55e9184
imagetools inspect: multi-platform support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 20:30:08 +01:00
CrazyMax 6c56109083
imagetools inspect: add --format flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-02-25 17:55:34 +01:00
CrazyMax eab0e6a8fe
cli: fix builder persistent flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-04 18:52:17 +01:00
Tonis Tiigi 88d0775692 refactor accessing registry configs via drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-11-04 10:01:23 -07:00
Sebastiaan van Stijn e1bbb9d8de
imagetools inspect: don't discard errors from PrintManifestList
Looks like this function may return an error, which we currently discard.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-03-24 15:54:32 +01:00
Tonis Tiigi eb1aabe9e3 imagetools: avoid printing newline on raw mode
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-10-28 16:14:35 -07:00
Tonis Tiigi 94a0422a1b rename to docker/buildx
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-24 20:02:20 -07:00
Tonis Tiigi 0a28ec6f38 imagetools: implement inspect for manifest list
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 15:41:40 -07:00
Tonis Tiigi a0719aee88 commands: imagetools stubs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 15:41:35 -07:00