Commit Graph

203 Commits

Author SHA1 Message Date
Tonis Tiigi aa52a5a699 build: set local sharedkey per project basename
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-10-29 21:29:04 -07:00
CrazyMax dd15969c93
build: add cgroup-parent support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-28 19:34:47 +02:00
CrazyMax 25d2f73858
build: warning on deprecated flags
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-26 21:36:49 +02:00
CrazyMax 36a37a624e
refactor: flags lexical order
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-26 13:11:28 +02:00
CrazyMax 8e5595b7c7
build: add shm-size support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-19 21:06:01 +02:00
CrazyMax b89e2f35df
build: add ulimit support
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-10-15 16:03:49 +02:00
CrazyMax 9e62c9f074
Fix --driver flag usage markdown output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-29 15:33:44 +02:00
Tõnis Tiigi b05c313204
Merge pull request #740 from bossmc/support-quiet
Implement `--quiet` support
2021-09-03 11:00:26 -07:00
CrazyMax 8a12884814
Fix flags usage markdown output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-09-03 11:52:49 +02:00
Andy Caldwell ef3e46fd62
Move printing to stdout up to the command itself
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2021-08-20 15:13:23 +01:00
Andy Caldwell c19c018a4c
Implement `--quiet` support
Signed-off-by: Andy Caldwell <andrew.caldwell@metaswitch.com>
2021-08-20 15:13:13 +01:00
CrazyMax 3d1ab82dc6
Duplicated progress env var
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-07-25 12:40:13 +02:00
Tonis Tiigi 9d88450118 enable opentelemetry support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-07-12 13:42:52 -07:00
CrazyMax 1253020b3d
Add metadata-file flag
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-06-30 07:41:26 +02:00
Akihiro Suda 399df854ea
build: split buildflags package
Planned to be imported by nerdctl in future.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2021-04-12 14:36:56 +09:00
Alex Couture-Beil eec843a325 include default ssh socket when given an ssh-based git url
Signed-off-by: Alex Couture-Beil <alex@earthly.dev>
2021-04-01 11:25:18 -07:00
Tonis Tiigi 4047bccf6c
docs: add external docs links support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-03-25 00:44:29 +01:00
Tonis Tiigi dba79ba223 update lint to go1.16/golangci
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2021-02-16 23:43:06 -08:00
CrazyMax d05504c50f
Allow to set default progress through env var
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2021-01-11 01:41:44 +01:00
Tonis Tiigi 1496ac9b55 util: simplify progress syncronization
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-12-07 22:02:51 -08:00
Jean-Yves Gastaud 1f04ec9575 fixes #401
Replace error generated by `quiet` option by a warning.

Signed-off-by: Jean-Yves Gastaud <jygastaud@gmail.com>
2020-09-28 11:24:14 +02:00
Tonis Tiigi 18095ee87b bake: reset no-cache and pull if not set
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2020-04-30 13:01:45 -07:00
Tibor Vass c4d07f67e3 commands: check if flag is set instead of using flagutil.Tristate
Fixes --pull and --no-cache without argument

Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-30 12:25:41 -07: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
Brian Goff 213d3af3b0 Add option to build/bake to override instance
This helps prevent race conditions with concurrent build invocations.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-04-27 11:12:31 -07:00
Tibor Vass 2a257a8252 bake: allow overriding no-cache and pull per target via --set
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-23 18:11:22 +00:00
Tibor Vass 417f52e001 bake: add --load and --push shorthands for --set
Signed-off-by: Tibor Vass <tibor@docker.com>
2020-04-23 05:54:11 +00:00
Brian Goff 5e4444823c build: only use env for args if set
When following this pattern:

  buildx build --arg FOO

Where we want to pull `FOO` from env, currently we always set `FOO`
regardless if the `FOO` env var is even set.

This change makes it so that `FOO` would only be set if it has been set
in the env (even if it is set to empty).

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2020-01-06 12:02:06 -08:00
Akihiro Suda 6b65b0c982 new driver: kubernetes
Tested with `kind` and GKE.

Note: "nodes" shown in `docker buildx ls` are unrelated to Kubernetes "nodes".
Probably buildx should come up with an alternative term.

Usage:

  $ kind create cluster
  $ export KUBECONFIG="$(kind get kubeconfig-path --name="kind")"

  $ docker buildx create --driver kubernetes --driver-opt replicas=3 --use
  $ docker buildx build -t foo --load .

`--load` loads the image into the local Docker.

Driver opts:

  - `image=IMAGE` - Sets the container image to be used for running buildkit.
  - `namespace=NS` - Sets the Kubernetes namespace. Defaults to the current namespace.
  - `replicas=N` - Sets the number of `Pod` replicas. Defaults to 1.
  - `rootless=(true|false)` - Run the container as a non-root user without `securityContext.privileged`. Defaults to false.
  - `loadbalance=(sticky|random)` - Load-balancing strategy. If set to "sticky", the pod is chosen using the hash of the context path. Defaults to "sticky"

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2019-11-21 10:30:39 +09:00
Tibor Vass 096d1befc9
Merge pull request #104 from tonistiigi/entitlements
build: add allowed entitlements
2019-07-31 15:36:13 -07:00
Tonis Tiigi 43150ef849 build: load default build args from env
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-30 16:32:36 -07:00
Tonis Tiigi 6b81b0bed6 build: add allowed entitlements
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-07-08 15:59:53 -07:00
Tibor Vass 715d38ff96
Merge pull request #75 from tonistiigi/update-buildkit
vendor: update buildkit to f238f1e
2019-05-15 10:39:55 -07:00
Tonis Tiigi 717a4afae0 build: add missing flags
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-14 18:06:42 -07:00
Tonis Tiigi b68b005f68 vendor: update buildkit to f238f1e
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-05-14 17:59:01 -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 0398fa337b build: multi-node build support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-23 21:18:40 -07:00
Tibor Vass 6e3dfe72cb
Merge pull request #31 from tonistiigi/platforms-fixes
fixes for managing platforms
2019-04-18 20:11:28 -07:00
Tonis Tiigi 96a148020a build: add cache-from and cache-to support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-17 23:07:22 -07:00
Tonis Tiigi e773d0eb2a util: add platformutil
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-17 16:49:28 -07:00
Tonis Tiigi aa421f9c9e build: add push and load flags
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-17 07:45:49 -07:00
Tonis Tiigi cac37434aa build: add docker output for non-moby drivers
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-17 07:45:43 -07:00
Tibor Vass 635e393ae5 build: handle --network
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-17 04:25:54 +00:00
Tibor Vass 77ed999572 build: handle --add-host
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-17 04:25:54 +00:00
Tibor Vass dc07613bd2 build: support more variations on context and dockerfile + iidfile
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-17 04:25:54 +00:00
Tibor Vass 81b35147e4 build: do not error out if --network is default
Signed-off-by: Tibor Vass <tibor@docker.com>
2019-04-16 23:37:23 +00:00
Tonis Tiigi 103b452876 commands: add missing flags as hidden in build
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-16 10:55:39 -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 a932d52e35 bake: initial implementation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-04-09 19:26:53 -07:00
Tonis Tiigi 15dae19cf8 driver: add client method
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-26 11:37:07 -07:00
Tonis Tiigi a6d893efca driver: add logging support to bootstrap
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2019-03-26 11:36:16 -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