231 Commits

Author SHA1 Message Date
Tonis Tiigi
5d47cc1884 docs: update CDI example to match the current debug workers output.
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-10 07:20:31 -07:00
CrazyMax
ef191af965 vendor: github.com/urfave/cli/v3 v3.9.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-06-10 10:12:36 +02:00
Tonis Tiigi
bea9e762d5 docs: document proxy network
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-09 09:11:36 -07:00
Tonis Tiigi
023022108c buildkitd: add daemon proxy network option
Add a proxyNetwork TOML setting and --proxy-network daemon flag to enable
exec proxy enforcement for every build. Wire the default through controller
and solver setup while preserving per-build enablement.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-04 11:23:02 -07:00
Tonis Tiigi
81e4095b13 solver: keep runtime load opts out of LLB digests
Apply proxy network as an explicit LLB mutation before digest recompute,
while keeping runtime load options such as platform normalization applied
when creating vertices.

This preserves distinct cache keys for proxy-network builds without
breaking gateway warning and source-map lookups that use the original LLB
digests from the frontend.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-04 11:23:02 -07:00
Tõnis Tiigi
2ff20da8b4 Merge pull request #6824 from tonistiigi/oci-mediatypes
exporter/containerimage: default to oci-mediatypes=true
2026-06-04 08:45:50 -07:00
Tonis Tiigi
6147354ae5 exporter: add compatibility version 30
Add compatibility-version 30 for the new OCI media type default while keeping
version 20 pinned to the historical image exporter behavior through v0.31.x.

Track omitted oci-mediatypes separately from explicit false, add v30
compatibility goldens, and document the supported compatibility versions.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-06-03 08:52:37 -07:00
CrazyMax
bb7ed5c529 attestation: update tests and docs for in-toto v1 statements
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-06-02 23:04:19 -07:00
Akihiro Suda
7d5b245aba docs: remove outdated cni-networking.md
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2026-06-02 03:59:21 +09:00
Tõnis Tiigi
f5ec43c9e9 Merge pull request #6569 from jirimoravcik/feat/add-cpu-memory-limits
solver: add per-step CPU and memory resource limits
2026-05-27 10:29:57 -07:00
Jiří Moravčík
f85c740c2b solver: add per-step CPU and memory resource limits
Add support for setting cgroup resource limits (memory, memory-swap,
cpu-shares, cpu-period, cpu-quota, cpuset-cpus, cpuset-mems) on
individual build steps.

Signed-off-by: Jiří Moravčík <jiri.moravcik@gmail.com>
2026-05-27 11:34:13 +02:00
Tõnis Tiigi
811d5a0cdb Merge pull request #6776 from jsternberg/configurable-registry-concurrency-simple
util/resolver/limited: make registry concurrency configurable by the configuration file
2026-05-21 12:02:17 -07:00
Jonathan A. Sternberg
ac1f99224c util/resolver/limited: make registry concurrency configurable by the configuration file
Adds a new field to the system configuration that sets the maximum
concurrency for registry connections.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2026-05-21 13:08:27 -05:00
Tonis Tiigi
bd3608ddc9 lint: update golangci-lint to v2.12.2
Update golangci-lint and adjust code for new gosec diagnostics. Use
root-scoped filesystem operations where appropriate, preserve explicit
user path behavior for SSH keys, and avoid background contexts in
request-scoped cleanup paths.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:15 -07:00
Jonathan A. Sternberg
937eaf88c8 feat: add log level option to buildkitd config
This adds a way to set the log level of buildkitd outside of using
`--debug` or `--trace` which allows increasing the log level rather than
only lowering it.

The `--debug` and `--trace` options are now deprecated along with the
configuration options. A warning will be printed to the log when they
are used.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2026-05-06 13:55:07 -05:00
Tõnis Tiigi
c1b5264bfd Merge pull request #6681 from tonistiigi/compat-version
solver: add compatibility-version support
2026-04-27 14:21:38 +02:00
Tõnis Tiigi
da08f1537f Merge pull request #6602 from tonistiigi/epoch-arg-context
dockerfile: support SOURCE_DATE_EPOCH=context
2026-04-15 17:55:55 -07:00
Akihiro Suda
28a12c50ad Dockerfile: update RootlessKit to v3.0.0
slirp4netns is no longer needed, as gvisor-tap-vsock is now embededd in
rootlesskit.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2026-04-11 06:27:13 +09:00
Tonis Tiigi
5fde446dee solver: add compatibility-version support
Add solve-wide compatibility-version support for image and oci
exports, with historical goldens and release compatibility tests.

Backfill version 10 for v0.13-v0.14 git artifact behavior, keep
version 20 as current, and reject unsupported zstd on v10.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-04-10 09:24:11 -07:00
Tonis Tiigi
4e1c8acd57 dockerfile: support SOURCE_DATE_EPOCH=context
Resolve SOURCE_DATE_EPOCH=context in the Dockerfile frontend from the
main build context and pass the resolved numeric epoch through normal
ARG handling and exporter metadata.

Use git commit time for git contexts, HTTP Last-Modified when present,
and newest archive entry mtime for HTTP archives. Leave local contexts
unset.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-04-08 15:27:20 -07:00
Tonis Tiigi
d751ebd4b9 dockerfile: support SOURCE_DATE_EPOCH as global ARG default
Allow Dockerfiles to define a default SOURCE_DATE_EPOCH value
via a global-scope ARG. The explicit caller-provided epoch
still takes priority. This lets Dockerfiles be self-contained
for reproducible builds without requiring external build args.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-03-20 17:19:25 -07:00
CrazyMax
a12f3aae76 default to provenance slsa v1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-17 13:11:10 +01:00
Tonis Tiigi
a431e27a08 docs: add signed gha cache docs
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-05 18:06:24 -08:00
Sebastiaan van Stijn
8607e212a7 docs: update nydus repository URLs
The repository was renamed to https://github.com/dragonflyoss/nydus,
and while GitHub does provide redirects, their services have been
a bit flaky recently so sometimes the redirects would fail.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-12-12 13:30:02 +01:00
CrazyMax
8bd2eeaa51 docs: provenanceEnvDir in buildkitd.toml
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-06 10:56:34 +02:00
greggu
97d242fd1c Update buildkitd.toml.md
Rephrase the wording based on review comment

Signed-off-by: greggu <contact@guhuajun.com>
2025-09-19 09:28:23 +08:00
greggu
820a262668 Update buildkitd.toml.md
rephrase the wording

Signed-off-by: greggu <contact@guhuajun.com>
2025-09-19 08:45:31 +08:00
greggu
3ae7ced309 Update buildkitd.toml.md
A follow-up action for this issue discussion.
https://github.com/moby/buildkit/issues/6068#issuecomment-3301748043

Signed-off-by: greggu <contact@guhuajun.com>
2025-09-18 09:20:17 +08:00
Andrés Delfino
9778c87e45 Using --oci-worker-no-process-sandbox is discouraged
Signed-off-by: Andrés Delfino <adelfino@gmail.com>
2025-08-10 07:31:26 -03:00
CrazyMax
74008209ec buildkitd: add flag to set max parallelism
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-24 15:52:26 +02:00
CrazyMax
bc0c857973 buildkitd: handle device insecure entitlement
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-11 17:44:26 +02:00
CrazyMax
b1cff7326a docs: fix heading levels in slsa-definitions page
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-11 18:10:54 +02:00
CrazyMax
10e725d3b2 docs: provenance slsa v1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-11 11:16:24 +02:00
Tõnis Tiigi
2ff77b2950 Merge pull request #6019 from zfrank/patch-1
Update buildkitd.toml.md registry examples
2025-06-06 14:24:24 -07:00
zfrank
608d2b45a6 Update buildkitd.toml.md registry examples
Add a couple of comments explaining what the registry parameters  `http` and `insecure` actually mean.

I was confused by this and I'm not alone: https://github.com/moby/buildkit/issues/4458

Signed-off-by: zfrank <zfrank@users.noreply.github.com>
2025-06-06 14:59:55 +02:00
Nicolas Schweitzer
676a17591d fix(readme): Add a missing trailing double quote
I faced 'The string is missing the terminator: ".' by following the readme guide and copy/pasting the given snippets, so I propose to fix it for other users.

Signed-off-by: Nicolas Schweitzer <nicolas.schweitzer@datadoghq.com>
2025-06-06 14:23:58 +02:00
Brian Goff
96447a83e2 Add support for raw mode in the SSH agent provider.
In fraw mode it just does a raw proxy on the connection.
There's no internal SSH agent or anything.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
2025-06-03 09:03:07 -07:00
Akihiro Suda
24ecdac86c Dockerfile: curl: add -S -f
-S, --show-error: show an error on failure
-f, --fail:       fail fast with no output at all on server errors

Prior to this commit, curl was just saving an error HTML as the content

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-05-20 19:30:39 +09:00
liulanzheng
c097f43378 Support for building overlaybd images
Signed-off-by: liulanzheng <lanzheng.liulz@alibaba-inc.com>
2025-05-12 14:20:20 +08:00
Gleb Nebolyubov
4077bb3c9f buildctl: fix tlsdir handling logic for cert-manager.io
`tldir` flag handling now properly handles the old logic and the new
logic for cert-manager.io without failing.

Improved error message when files are missing.

Co-authored-by: Gleb Nebolyubov <gleb.nebo@gmail.com>
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-04-28 13:28:05 -05:00
Tõnis Tiigi
90ad1f9eb0 Merge pull request #5917 from profnandaa/fix-windows-cni-setup
fix: wcow: simplify CNI setup for windows
2025-04-17 10:41:15 -07:00
Alberto Garcia Hierro
3b3a97449f chore: update broken links to https://docs.docker.com/registry
Link to https://distribution.github.io/distribution instead

Signed-off-by: Alberto Garcia Hierro <damaso.hierro@docker.com>
2025-04-17 11:15:59 +01:00
Anthony Nandaa
9cae715c26 fix: wcow: simplify CNI setup for windows
To enable CNI networking for WCOW, you needed to provide
long paths when running the daemon, e.g.
```
buildkitd `
    --containerd-cni-config-path="C:\Program Files\containerd\cni\conf\0-containerd-nat.conf" `
    --containerd-cni-binary-dir="C:\Program Files\containerd\cni\bin"
```

Fix this so that the default paths are set in appdefaults,
instead of the one that had be set previously.
Now you can just run: `buildkitd`.

Also, refactor the script for setting up CNI binaries
and configs, to make it easy to refresh the configs
without having to download the binaries afresh.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2025-04-16 15:39:05 +03:00
Akihiro Suda
3a91b50be1 rootless: update docs and examples
Fix issue 5763

- Discourage `--oci-worker-no-process-sandbox`, due to the leakage of
  the processes (by design).
  Instead, encourage setting `systempaths=unconfined` in `docker run`.
  This corresponds to `securityContext.procMount: Unmasked` in Kubernetes,
  however, the configuration is hard on Kubernetes, as it has to be used
  in conjunction with `hostUsers: false`.

- Remove `--device /dev/fuse`, as fuse-overlayfs is no longer used typically.

- Use the new Kubernetes struct for AppArmor

- Add a hint about `kernel.apparmor_restrict_unprivileged_userns`

- Remove `$` from command snippets for ease of copypasting

- Make `job.*.yaml` more practical

- Add `*.userns.yaml`. Needs `UserNamespaceSupport` feature gate to be enabled.

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
2025-02-21 16:57:53 +09:00
Anthony Nandaa
db8d975012 fix: cdi: add appdefaults.CDISpecDirs for windows
Since CDI support is enabled by default, add a default
CDI spec directory for Windows. Without this, the
buildkitd fails to start with error:

	buildkitd: No CDI specification directories specified

Also add a note on the docs that the support is yet
to be tested on Windows.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2025-02-12 10:46:24 +03:00
CrazyMax
60d305d9fd cdi: docs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-11 16:58:35 +01:00
CrazyMax
f7f1774703 cdi: fixes since enabled by default
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-11 11:21:46 +01:00
CrazyMax
33f21640c3 buildkitd: update default cdi spec dirs
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-11 11:21:45 +01:00
CrazyMax
ca49048881 buildkitd: cdi config
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-11 11:21:43 +01:00
Anthony Nandaa
d3d0b1f130 fix: docs: windows: enhance the CNI setup instructions
The previous instructions had a slight mistake where the CNI
version was similar to the CNI plugin Version. At that time,
that was true, we had 0.3.0. However, the latest plugin
version is 0.3.1 and supports upto CNI v 1.0.0.

Fix the installation scripts to have `$cniVersion` and
`$cniPluginVersion` as separate variables.

Also add script to set up HNS Network on WS2019 when
it is not already available by default, like in the
rest of the SKUs WS2022+, after enabling Hyper-V.

Signed-off-by: Anthony Nandaa <profnandaa@gmail.com>
2025-01-31 16:23:35 +03:00