436 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
94dcaca630 update protoc to v3.14.0
Updating to the lowest release that includes [protobuf@dfab275], which
removed use of the github.com/golang/protobuf/ptypes/timestamp.Timestamp
type alias (deprecated).

[protobuf@dfab275]: dfab275eca

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-06-05 18:01:59 +02:00
CrazyMax
863c9dc919 ci: switch to bento/freebsd-14 vagrant box
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-06-05 13:06:39 +02:00
Tõnis Tiigi
550cf8b8b7 Merge pull request #6774 from tonistiigi/0513-dev-tools-updates
dev tools updates
2026-05-14 17:37:14 -07:00
Tonis Tiigi
64f364fd9f update protolint to v0.56.4
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:22 -07:00
Tonis Tiigi
2beb143001 update govulncheck to v1.3.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:21 -07:00
Tonis Tiigi
4ffb02ffcd update doctoc to v2.4.1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-05-14 10:13:21 -07: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
CrazyMax
f3c6fef9b6 hack: switch to gomod-updates
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-05-13 13:52:17 +02: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
Tonis Tiigi
95735c4ef9 ci: run compatibility releases via hack/test
Move compatibility-releases to a single job that reuses the
integration test image flow from the main test workflow.

Add hack/test support for injecting a buildkitd binary and add a
dedicated hack/test-compatibility-releases wrapper for the release
sweep.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-04-14 19:16:07 -07:00
Jonathan A. Sternberg
cf6b18e7c9 chore: prune unused protobuf files from googleapis
Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2026-04-09 14:58:46 -05:00
CrazyMax
0e440708bf hack: print the README diff when doctoc validation fails
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-04-07 11:08:15 +02:00
Sebastiaan van Stijn
4eea931b28 Dockerfiles: pin doctoc to a fixed version
The v2.4.0 release had a minor regression and didn't detect the HTML
comments correctly;

```
diff --git a/README.md b/README.md
index 3f271be8625e..8ec4a7c5a421 100644
--- a/README.md
+++ b/README.md
@@ -42,6 +42,7 @@ Join `#buildkit` channel on [Docker Community Slack](https://dockr.ly/comm-slack

 <!-- START doctoc generated TOC please keep comment here to allow auto update -->
 <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
+<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

 - [Used by](#used-by)
 - [Quick start](#quick-start)
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2026-04-07 10:58:44 +02:00
CrazyMax
60f69ab411 hack: fall back when cgroup remount setup is unavailable
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-16 16:21:12 +01:00
Tonis Tiigi
c33e1fa5cd chore: bump Go toolchain to 1.26
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-25 16:16:09 -08:00
Tõnis Tiigi
4a388e149d Merge pull request #6368 from marxarelli/review/unshare-cgroupns-entrypoint
dockerfile: run buildkitd within a cgroup namespace for cgroup v2
2026-02-24 09:30:39 -08:00
CrazyMax
93f176ade0 hack: write cgroup namespace progress message to stderr
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-24 17:17:58 +01:00
Tonis Tiigi
7f2cbc61ba http: add support for checksum requests for http sources
These requests allow computing additional checksum algorithms
for the payload of HTTP sources.

Optionally suffix can be passed that is added to payload. This
is needed to make validation of PGP signatures possible remotely.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-02-20 08:13:32 -08:00
Dan Duvall
9a1bf2a83b dockerfile: run buildkitd within a cgroup namespace for cgroup v2
Introduce a new entrypoint script for the Linux image that, if cgroup v2
is in use, creates a new cgroup and mount namespace for buildkitd within
a new entrypoint using `unshare` and remounts `/sys/fs/cgroup` to
restrict its view of the unified cgroup hierarchy. This will ensure its
`init` cgroup and all OCI worker managed cgroups are kept beneath the
root cgroup of the initial entrypoint process.

When buildkitd is run in a managed environment like Kubernetes without
its own cgroup namespace (the default behavior of privileged pods in
Kubernetes where cgroup v2 is in use; see [cgroup v2 KEP][kep]), the OCI
worker will spawn processes in cgroups that are outside of the cgroup
hierarchy that was created for the buildkitd container, leading to
incorrect resource accounting and enforcement which in turn can cause
OOM errors and CPU contention on the node.

Example behavior without this change:

```console
root@k8s-node:/# cat /proc/$(pgrep -n buildkitd)/cgroup
0::/init
root@k8s-node:/# cat /proc/$(pgrep -n some-build-process)/cgroup
0::/buildkit/{runc-container-id}
```

Example behavior with this change:

```console
root@k8s-node:/# cat /proc/$(pgrep -n buildkitd)/cgroup
0::/kubepods/burstable/pod{pod-id}/{container-id}/init
root@k8s-node:/# cat /proc/$(pgrep -n some-build-process)/cgroup
0::/kubepods/burstable/pod{pod-id}/{container-id}/buildkit/{runc-container-id}
```

Note this was developed as an alternative approach to moby/buildkit#6343

[kep]: 6d3210f7dd/keps/sig-node/2254-cgroup-v2 (cgroup-namespace)

Signed-off-by: Dan Duvall <dduvall@wikimedia.org>
2026-01-23 09:31:09 -08:00
CrazyMax
18ad342e57 Merge pull request #6460 from tonistiigi/golint-v2.8.0-update
hack: golangci v2.8.0 and gopls v0.38.0 update
2026-01-14 15:44:19 +01:00
Tonis Tiigi
5b6c89222b Dockerfile: fix version inconsistencies
Make sure Alpine, xx, Debian use same versions across Dockerfiles.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:49 -08:00
Tonis Tiigi
55ac82cb58 hack: update gopls to v0.38.0
Currently it is not possible to update to more
recent version as modernize causes errors in generated code.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:25 -08:00
Tonis Tiigi
a8b83196f3 ci: update golangci to v2.8.0
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2026-01-13 22:09:20 -08:00
CrazyMax
0ad7a44d11 update alpine to 3.23
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-12 09:57:19 +01:00
CrazyMax
71068191db hack: use bake to build the dockerfile frontend
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-11-25 18:55:48 +01:00
Tonis Tiigi
04a38743bd hack: ssh fixtures generation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-22 10:10:59 -07:00
Tonis Tiigi
1a3289a899 hack: gpg test fixtures generation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-10-22 10:10:56 -07:00
CrazyMax
05fdd002b6 hack: use bake to build buildkit binaries
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-15 13:47:33 +02:00
CrazyMax
1fa57ee945 hack: use bake to build buildkit images
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-13 17:41:15 +02:00
Tõnis Tiigi
399c615e50 Merge pull request #6254 from crazy-max/hack-slsa-v1
hack: enable SLSA provenance v1 for buildkit and frontend images
2025-10-13 08:38:44 -07:00
CrazyMax
373f658d67 hack: fix no-cache-filter on release
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-01 10:26:55 +02:00
CrazyMax
61c3a9e1cd hack: enable SLSA provenance v1 for buildkit and frontend images
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-30 13:34:56 +02:00
Jonathan A. Sternberg
916074cfc5 hack: update hack/compose with newer otel collector
Modifies the hack/compose script to use a newer otel collector and try
to suppress miscellaneous logs when it fails to export traces. Disable
jaeger, prometheus, and grafana by default.

It also adds a metrics pipeline that goes to a nop exporter. This is
force the otel collector to start the metrics service and prevent an
error when buildkit exports metrics to the otel collector related to the
metrics service being missing.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-09-23 10:49:24 -05:00
Jonathan A. Sternberg
f4339fd00b tools: utilize the new tool functionality introduced in go 1.24
Removes the `tools/tools.go` file used as a hack to get `go.mod` to
track tools in favor of the new method introduced in go 1.24 of being
formally supported in the `go.mod` file. This will allow the tools to be
managed with the new `go get tool` and `go install tool` commands.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-09-10 10:08:03 -05:00
Tonis Tiigi
04dbf0ba44 update go to 1.25
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-09-09 15:14:18 -07:00
CrazyMax
060be8484d hack: modernize-fix bake target
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-09-09 14:00:26 +02:00
CrazyMax
e70ed65cbc update alpine to 3.22
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-27 11:34:46 +02:00
CrazyMax
628d5cb2cb dockerfile: update govulncheck to v1.1.4
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-23 10:00:51 +02:00
Tonis Tiigi
9fcedf9807 update gopls to go1.24 compatible version
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-07 18:23:20 -07:00
Tonis Tiigi
3e5d4dcdf8 update to go1.24
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-07 16:59:15 -07:00
Tonis Tiigi
f1f56c2b77 golangci-lint: v2 upgrade
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-02 12:19:17 -07:00
Jonathan A. Sternberg
4fc3a2d435 hack: aggregate protobuf includes to a separate stage
This moves the aggregation of the various protobuf includes (binaries
and include files) to a separate stage so the files can be retrieved
more easily by external tools.

Since the canonical way of retrieving the protobuf dependencies is to
use this file and the dependencies can be quite complicated to retrieve,
this makes it easier for outside contributors to retrieve the
dependencies and copy them into their own repositories.

This was possible before by using the `tools` target, but that would
also include the entire `golang` image. Now you can retrieve just the
`protobuf` target to get the binaries and the include files.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
2025-04-14 11:00:14 -05:00
CrazyMax
08633159ad ci: fix freebsd package repository
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-04-08 11:03:47 +02:00
Tonis Tiigi
630067bb9a hack: allow building golangci from source for custom versions
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-17 17:43:49 -07:00
Tonis Tiigi
b5286f8dcb apply x/tools/modernize fixes
Autogenerated with couple of manual patches.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-03-07 08:18:45 -08:00
CrazyMax
1df5e2892d hack(images): set EXPORT_BASE and BUILDKITD_TAGS args
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-25 11:50:07 +01:00
CrazyMax
1c917b4290 test: handle gha cache v2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-02-18 19:07:45 +01:00
Tonis Tiigi
33088c1a56 hack: allow passing config file to test and shell script
One should not use their regular docker credentials here
but make a special config file with only public readonly
token inside.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-01-30 19:00:29 -08:00
CrazyMax
2a1cc96230 hack: mount docker config on gha
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-01-30 17:17:26 -08:00