Commit Graph
617 Commits
Author SHA1 Message Date
Tonis Tiigi 499261eed5 build: avoid empty line when -q used with --call
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-13 17:11:35 -08:00
Tonis Tiigi 8d605dcd87 policy: add image.provenance input type
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-12 11:59:06 -08:00
Tõnis TiigiandGitHub bcb8583078 Merge pull request #3638 from crazy-max/imagetools-create-digest
imagetools: metadata-file flag
2026-02-11 10:59:38 -08:00
Tõnis TiigiandGitHub 7940a9650d Merge pull request #3646 from crazy-max/urlutil
history: don't import build package
2026-02-11 10:59:05 -08:00
CrazyMax 7899695fa6 history: don't import build package
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-11 10:29:47 +01:00
CrazyMax a2f3c6a1b8 imagetools: metadata-file flag
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-10 13:52:00 +01:00
Tonis Tiigi 4e16277937 policy: update unknown keys normalization
Make the code more unified between validation and
test command. Normalize to key without the input prefix.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-09 18:27:35 -08:00
Jonathan A. Sternberg 3e0e9333c2 commands: adds metrics associated with the debugger
Add metrics associated with the debugger that are reported through the
metrics writer. This adds a few attributes that are only added when a
debugger is used with either the `debug` command or `dap` command.

At the moment, these metrics show up the exact same as a build and we
can't identify if something is using `dap` or `debug` since they use the
same code path.

This also adds a new available metric that can be utilized by plugins to
report additional information. The metrics will check if an environment
variable `BUILDX_DAP_USER_AGENT` is sent and that will get included in
the metrics if they are enabled.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2026-01-28 14:05:11 -06:00
Tonis Tiigi 87c77aca7b imagetools: avoid trying to load attestations inline references
When creating resulting image index it is wasteful
to check for attestations for the descriptors in original
index what were already attestation for subject manifest.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-28 08:28:29 -08:00
Tonis Tiigi 510369170a imagetools: fix excessive copies on create command
Currently needed manifests were filtered out and then
copied in a loop, but for each copy still the full
unfiltered descriptor was copied instead of single
manifest, resulting multiple push attempts for same
descriptor.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-28 08:27:17 -08:00
CrazyMaxandGitHub 841017f665 Merge pull request #3629 from thaJeztah/errs_alias
use consistent alias for stdlib "errors"
2026-01-27 12:58:14 +01:00
CrazyMaxandGitHub fd4fbd0be8 Merge pull request #3626 from thaJeztah/native_multierror
commands/history: rewrite with stdlib multi-errors
2026-01-27 12:53:12 +01:00
Sebastiaan van Stijn 3eee42b002 use consistent alias for stdlib "errors"
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-27 11:14:27 +01:00
Sebastiaan van Stijn 39ee64df71 commands/history: rewrite with stdlib multi-errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-01-26 12:53:33 +01:00
Tonis Tiigi 8f71a4805e imagetools: remove temp workaround for fixed containerd bug
The issue has been fixed in containerd/containerd#12508

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-23 09:50:20 -08:00
Tõnis TiigiandGitHub 9567f7f4d2 Merge pull request #3614 from tonistiigi/policy-json-stub
commands: remove policy json-schema stub
2026-01-16 14:27:33 -08:00
Tonis Tiigi d0e4db27e0 commands: remove policy json-schema stub
Remove stub for now so we don't ship it in a release.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 12:48:46 -08:00
Tonis Tiigi 89fdef17e6 policy: fixes for image source handling
- Make sure tag is added to image reference as
containerd reference parser refuses to parse otherwise.

- When attestation is asked from non-index, return
nil instead of error. This is for consistency as likely
to fail in BuildKit before that is fixed separately.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 12:12:41 -08:00
Tonis Tiigi 20405112c2 policy: allow image source without set platform
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-16 11:48:55 -08:00
Tonis Tiigi c5322ca727 bake: add --var flag for setting variable values
This provides alternative way to set values for Bake
variables without adding them the global environment variables.
This can also be used then environment variable access
is disabled with BUILDX_BAKE_DISABLE_VARS_ENV_LOOKUP.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-15 23:17:28 -08:00
Tonis Tiigi c6ecdc08cf commands: implement policy test command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 10:31:12 -08:00
Tonis Tiigi 9f1daffb32 policy: implement policy support for bake
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:34:23 -08:00
Tonis Tiigi 071ce556a5 tests: add http based policy eval tests
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:34:01 -08:00
Tonis Tiigi be42b48462 policy: implement policy logging via progress printer
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:10:34 -08:00
Tonis Tiigi 5ad09ce3eb commands: implement policy eval command
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:10:33 -08:00
Tonis Tiigi d232d4c392 commands: add stubs for policy commands
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:09:10 -08:00
Tonis Tiigi 0e1036bef5 policy: add multiple policy support
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:09:10 -08:00
Tonis Tiigi 4af8cdb6af build: add --policy flag for controlling policy configuration
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-14 09:09:08 -08:00
Paweł Gronowski 41a1782b35 build: Don't unpack by default when pushing
Automatically set `unpack=false` for registry exports unless explicitly
overridden by the user.

This applies to:

- `registry` exporter type (converted to `image` exporter with `push=true`)
- `--push` flag usage with image exporters

Users can still explicitly set `unpack=true` if they need local image
storage alongside registry push.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
2026-01-14 16:04:45 +01:00
Tonis Tiigi c5154b3169 update linters for go1.25 base version
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-09 18:54:15 -08:00
Tõnis Tiigi 37e283ceb0 auth: add option to load docker config for specific repo/scope
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-07 11:45:04 -08:00
Jonathan A. Sternberg fdfba3014d tests: add integration tests for dap build
This adds integration tests for the `dap build` command to test various
behavior associated with the command. We start the build and the
integration test acts as a dap client to send requests and check that
the output is what we expect.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-12-17 10:56:30 -06:00
Sergei Khomenkov cecd8e9570 commands: fix debug flag in standalone mode
The -D/--debug flag was not enabling debug logging in standalone mode.

Root cause: debug.Enable() was called before dockerCli.Initialize(),
but Initialize() calls SetLogLevel("") which resets logrus level to
Info, and since options.Debug was false, it wasn't re-enabled.

Fix: Pass opt.debug to options.Debug before Initialize() so it
properly enables debug level after SetLogLevel().

Signed-off-by: Sergei Khomenkov <sergey@homenkow.ru>
2025-12-07 13:52:15 +02:00
Sebastiaan van Stijn 18dc2e088a vendor: github.com/moby/moby/api v1.52.0, moby/client v0.1.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-11-12 01:30:02 +01:00
Tonis Tiigi e9804322f8 imagetools: fix concurrent map write from containerd issue
Workaround for containerd issue that can cause concurrent map
write when WithMediaTypeKeyPrefix is called in parallel
goroutines for context that originated from same base context.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-11 10:43:54 -08:00
Tonis Tiigi 79b6474639 imagetools: add sigstore bundle v3 to supported referrer formats
This was added after the initial version was written.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-11-05 14:00:05 -08:00
Tonis Tiigi e13cd5c9df imagetools: support for creating attestations/signatures
Persist attestation manifest and any manifest cosign-based
signatures when creating new images.

When creating index from single-arch manifests where attestation
manifest is not inlined, it can be loaded from referrers API.
Note that for this to work the attestation manifest needs to be
in artifact type when image was built.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
(cherry picked from commit aab8171f824d13d703e869107e1720ad71d24bff)
2025-11-05 12:59:27 -08:00
Tõnis TiigiandGitHub 805c377292 Merge pull request #3454 from jsternberg/buildx-tag-help
docs: clarify cli help for the `--tag` option
2025-10-23 12:11:33 -07:00
CrazyMaxandGitHub f478741671 Merge pull request #3459 from crazy-max/history-input-context
history: input:context attribute support
2025-10-22 21:23:35 +02:00
Akihiro Suda 9e876421ee deprecate docker buildx install and docker buildx uninstall
Deprecate these commands in favor of using `docker buildx` directly,
without relying on the `docker builder` alias.

The commands have been hidden since the beginning.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-10-17 01:58:32 +09:00
CrazyMax c40f9d9802 history: input:context attribute support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-11 23:04:01 +02:00
Jonathan A. Sternberg ec01355b03 docs: clarify cli help for the --tag option
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-10-06 12:46:59 -05:00
Tonis Tiigi ef2b4436cb imagetools: fix possible broken chain copy on create
When creating index from singe-arch manifests it
was possible for some of the internal manifests to not
be copies and cause error on pushing the index.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-02 10:36:48 -07:00
Tõnis TiigiandGitHub 40f318f9d8 Merge pull request #3431 from tonistiigi/progress-none
add progress=none option
2025-09-23 11:33:37 -07:00
Tonis Tiigi f448f3e22b imagetools: add platforms filter to imagetools create
Allows specifying platforms that should be included
in the new image, making it possible to reduce platforms
of existing multi-arch image. Previously the individual
image manifests needed to be used as sources, but that
dropped their related attestation manifests.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-09-23 08:10:11 -07:00
Tonis Tiigi 9c7b9628ef add progress=none option
Currently there is no way to completely suppress the progress output.
We have --progress=quiet but it has additional effect of printing
image ID as a progress for historical reasons. --progress=none
behaves like quiet but without this extra output printing depending
on build output.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-09-22 10:10:20 -07:00
CrazyMaxandGitHub e540b7af14 Merge pull request #3421 from aevesdocker/ENGDOCS-2992
docs: --load flag clarity
2025-09-11 17:03:37 +02:00
aevesdocker 05c6753bb7 docs: --load and --push flag clarity
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2025-09-11 14:41:22 +01:00
CrazyMaxandGitHub 3293a2ef41 Merge pull request #3419 from aevesdocker/ENGDOCS-2986
docs: device entitlements
2025-09-11 13:55:17 +02:00
aevesdocker 9d8107ee3d docs: device entitlements
Signed-off-by: aevesdocker <allie.sadler@docker.com>
2025-09-11 10:25:49 +01:00