Commit Graph

38 Commits

Author SHA1 Message Date
CrazyMax cc286e2ef5
cli: error out on unknown command
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-10-18 14:04:16 +02:00
Tonis Tiigi 7a7a9c8e01
commands: add debug as persistent flag
Allows using `--debug` to enable debug logging under
any subcommand. Currently it needed to be set as
`docker --debug buildx` meaning only way to enable debug
in standalone mode was to set env variable instead and
updating existing commands to add `--debug` was cumbersome.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2024-08-16 13:20:28 +03:00
CrazyMax 2a30229916
chore: check experimental from confutil
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2024-03-15 11:52:41 +01:00
Brian Goff 760244ee3e Add dial-stdio command
This allows the buildx CLI to act a proxy to the configured instance.
It allows external code to use buildx itself as a driver for connecting
to buildkitd instances.

Instance and node selection should follow the same semantics as as
`buildx build`, including taking into account the `BUILDX_BUILDER` env
var and the `--builder` global flag.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2024-02-08 22:16:00 +00:00
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
Akihiro Suda 02c2073feb
Mark experimental flags in `--help`
Prior to this commit, experimental flags were not distinguishable from
regular flags in `--help`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2024-01-13 19:53:56 +09:00
Kohei Tokunaga 508b2ef0c6
debug: Add `buildx debug` command
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-10-13 12:09:21 +09:00
CrazyMax 6b5758f4cd
Merge pull request #1821 from jedevc/allow-debug-env
commands: consume DEBUG environment variable
2023-08-07 15:06:47 +02:00
Sebastiaan van Stijn 094d1aded8
commands: NewRootCmd: remove obsolete logrus filter hook
This hook was added in 278f94a8b6 and
72758fef22 to suppress spurious warnings
printed by the CLI's cli/connhelper/commandconn package;
3fb4fb83df/cli/connhelper/commandconn/commandconn.go (L203-L214)

Those logs were removed in a5ebe2282a
so we can remove the hook.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-07-19 11:04:45 +02:00
Justin Chadwell d0bff18cee commands: consume DEBUG environment variable
When running in standalone mode, the --debug flag passed to docker
cannot be passed. The docker cli also supports a DEBUG env var, however,
in standalone mode this won't be consumed.

This patch reads the contents of the DEBUG environment variable, and
enables debugging logs when it's been set.

Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-05-22 09:52:23 +01:00
CrazyMax 621b07c799
Merge pull request #1727 from crazy-max/cmd-completion
cli: add shell completion
2023-05-09 10:59:32 +02:00
Kohei Tokunaga f373b91cc3
Add flags and subcommand
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-04-15 15:38:17 +09:00
CrazyMax a597266a52
cli: add completion to list builder names
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2023-04-11 11:45:59 +02: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
Justin Chadwell a9fd128910 controller: move controllers out of commands into separate package
Signed-off-by: Justin Chadwell <me@jedevc.com>
2023-01-31 17:51:33 +00:00
Kohei Tokunaga a27b8395b1 Enable to run build and invoke in background
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
2023-01-26 17:17:07 +09:00
Tonis Tiigi 72758fef22 root: ignore SSH CloseRead warning
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2022-04-29 08:24:13 -07:00
CrazyMax 95086cf641
cli: fix standalone command behavior
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-04-27 17:33:16 +02: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 d3e56ea9d9
root: simple output format on logrus for parity with cli
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-25 08:54:42 +01:00
CrazyMax 278f94a8b6
root: filter out useless commandConn.CloseWrite warning message
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-01-21 00:36:06 +01:00
Tonis Tiigi 038727477c root: filter out useless debug logs from vendored packages
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-12-19 22:33:05 -08:00
CrazyMax a0a7db127c
cli: fix flags usage
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-11-22 10:51:59 +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
CrazyMax e150d7bdd8
add long description to root command
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-26 13:11:28 +02:00
Brian Goff b2ec1d331c Add builder as a global flag.
This allows all subcommands to use this flag.
Additionally reads the default value for the flag from the
`BUILDX_BUILDER` env var.

Precedence is:

CLI ARG > flag > env var > config file

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-27 14:37:17 -07:00
Tonis Tiigi d52f5db6ba commands: add du command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-06 19:32:21 -07:00
Tonis Tiigi 66672b4052 commands: add prune command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-06 18:03:30 -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 6abbf0ee76 commands: add version command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-24 16:16:47 -07:00
Tibor Vass 416b7bb23f install/uninstall: allow aliasing buildx to `docker builder`
Currently the user can type `docker buildx` to use this tool.
This patch allows the user to install buildx as a `docker builder` alias.

As an additional benefit, this allows the regular `docker build` to hook
into `buildx build`.

Note that the install and uninstall commands are currently hidden.

Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-19 03:10:00 +00:00
Tonis Tiigi a0719aee88 commands: imagetools stubs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 15:41:35 -07:00
Tonis Tiigi bd3d5cd19e commands: add implementations for create, use, rm, stop
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-15 15:31:29 -07:00
Tonis Tiigi 950180ed82 commands: driver management command stubs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-11 18:35:08 -07:00
Tonis Tiigi 81d689e2e4 cmd: allow invoking without plugin
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-11 18:22:28 -07:00
Tonis Tiigi a932d52e35 bake: initial implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-09 19:26:53 -07:00
Tonis Tiigi f302881c0d driver: start implemeting bootstrap for docker
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-25 19:02:20 -07:00
Tonis Tiigi 4b0c0468d0 build: basis of build command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-23 23:11:33 -07:00