Commit Graph
3252 Commits
Author SHA1 Message Date
CrazyMax a11bb4985c vendor: github.com/moby/buildkit v0.22.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-21 14:57:25 +02:00
CrazyMaxandGitHub ea2b7020a4 Merge pull request #3193 from crazy-max/buildkit-0.22.0-rc2
vendor: github.com/moby/buildkit v0.22.0-rc2
2025-05-19 17:29:11 +02:00
CrazyMax 5ba7d7eb4f vendor: github.com/moby/buildkit v0.22.0-rc2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-19 17:14:59 +02:00
CrazyMaxandGitHub 95ac2b4d09 Merge pull request #3192 from crazy-max/update-cli-docs-tool
vendor: github.com/docker/cli-docs-tool v0.10.0
2025-05-19 16:23:50 +02:00
CrazyMax 934cca3ab1 vendor: github.com/docker/cli-docs-tool v0.10.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-19 15:54:56 +02:00
CrazyMaxandGitHub 6e562e9ede Merge pull request #3191 from glours/bump-compose-go-v2.6.3
bump compose-go to v2.6.3
2025-05-19 15:05:34 +02:00
Guillaume Lours 51b8646c44 bump compose-go to v2.6.3
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-05-19 14:49:51 +02:00
CrazyMaxandGitHub 57a1c97c9d Merge pull request #3187 from crazy-max/buildkit-0.22.0-rc1
vendor: github.com/moby/buildkit v0.22.0-rc1
2025-05-14 20:29:12 +02:00
CrazyMax 7a54b6ee7e vendor: github.com/moby/buildkit v0.22.0-rc1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-14 20:10:27 +02:00
CrazyMaxandGitHub 2e3108975d Merge pull request #3186 from crazy-max/fix-readme
update readme
2025-05-14 13:40:07 +02:00
CrazyMax cd48c516e2 update readme
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-14 13:21:45 +02:00
Tõnis TiigiandGitHub 2149f03225 Merge pull request #3184 from tonistiigi/lint-merge-conflict-fix
lint: fix linter after merge conflict
2025-05-13 16:52:49 -07:00
Tonis Tiigi f41d5072fd lint: fix linter after merge conflict
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-13 16:19:33 -07:00
Tõnis TiigiandGitHub 06a1a6344a Merge pull request #3180 from crazy-max/dockerfile-update
dockerfile: update docker to 28.1.1 and buildkit to 0.21.1
2025-05-13 15:09:27 -07:00
Tõnis TiigiandGitHub 4feb05b0bf Merge pull request #3179 from tonistiigi/ls-format-json-current
ls: make sure current builder is available in JSON output
2025-05-13 14:27:36 -07:00
Tõnis TiigiandGitHub 277548e91b Merge pull request #3152 from crazy-max/history-export-finalize
history: make sure build record is finalized before exporting
2025-05-13 14:20:04 -07:00
Tõnis TiigiandGitHub 3f0aec1b3e Merge pull request #3182 from crazy-max/go-1.24
update to go 1.24
2025-05-13 12:14:37 -07:00
CrazyMax 1383aa30c1 lint: modernize fix
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 20:44:57 +02:00
CrazyMaxandCrazyMax 09b824b9dc update to go 1.24
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 19:27:03 +02:00
CrazyMax 68ce10c4d9 tests: history cmds
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 17:17:47 +02:00
CrazyMax 78353f4e8e history: make sure build record is finalized before exporting
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 17:17:47 +02:00
CrazyMaxandGitHub 03f9877429 Merge pull request #3181 from crazy-max/golangci-lint-v2
update golangci-lint to v2.1.5
2025-05-13 17:17:17 +02:00
CrazyMax b606e2f6bb update golangci-lint to v2.1.5
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 16:54:43 +02:00
CrazyMax 874bb14de9 hack: golangci build from source support
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 16:20:35 +02:00
CrazyMaxandGitHub a9ab809d15 Merge pull request #3138 from crazy-max/history-copy
history: copy update
2025-05-13 13:06:05 +02:00
CrazyMax 72fde4c53a history: copy update
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 12:20:00 +02:00
CrazyMax df8b997588 dockerfile: update buildkit to 0.21.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 12:01:12 +02:00
CrazyMax f92c679e14 dockerfile: update docker to 28.1.1
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-13 12:00:45 +02:00
Tonis Tiigi a3180cbf3d ls: make sure current builder is available in JSON output
While lsBuilder has a field called Current that gets lost
because the embedded struct implements custom MarshalJSON method.

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-12 22:30:44 -07:00
Tõnis TiigiandGitHub c398e2a224 Merge pull request #3177 from crazy-max/docs-fix-hcl-syntax
docs: remove commas in bake hcl object blocks
2025-05-12 10:47:11 -07:00
Tõnis TiigiandGitHub 865ad2b8d5 Merge pull request #3167 from rrjjvv/variable-typing
Allow variables to be explicitly typed (and enforced)
2025-05-12 10:45:10 -07:00
CrazyMax 729d58152c docs: remove commas in bake hcl object blocks
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-05-12 10:30:45 +02:00
CrazyMaxandGitHub 9998ef7045 Merge pull request #3171 from glours/bump-compose-go-v2.6.2
bump compose-go to v2.6.2
2025-05-12 09:15:42 +02:00
CrazyMaxandGitHub 7e960152a1 Merge pull request #3168 from tonistiigi/bake-call-empty
bake: fix nil deference on empty call definition
2025-05-12 09:13:05 +02:00
Roberto Villarreal 56d39e619d Skip case-sensitive test on Windows
Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-05-09 18:36:11 -06:00
Roberto VillarrealandCopilot 65aea3028f Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-05-09 18:36:11 -06:00
Roberto Villarreal 956fc0c9eb Use unique environment variables to separate JSON from default parsing
The primary intent is to make JSON parsing explicitly opt-in rather than
 using heuristics to determine intent.

With some exceptions, given bake variable `VAR`, an environment variable
 `VAR_JSON` must be used to provide JSON content.  The value in
 `VAR_JSON` will be ignored when:
* a bake built-in of that same name exists
* a user-provided variable of that same name exists
* typing (attribute `type`) is not present

The first is unlikely to happen as built-ins will likely start with
`BUILDX_BAKE_`, an unlikely prefix for end users.  The second may be a
real scenario, where users have `VAR_JSON` dedicated to accepting a
string with JSON content and decoding via an HCL function.  This will
continue to work as-is, but can be simplified by removing the variable
from their bake file (`VAR_JSON`) and applying typing (to `VAR`).

Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-05-09 18:36:11 -06:00
Roberto Villarreal 1f56984626 Implement CSV-based overrides for list-like variables
Though CSV is favored for 'simple' lists, a JSON value will be used if
it parses without error.  This assumes that it is extremely unlikely
that something that parses as JSON would be intended to be parsed as
CSV, e.g. `["a"` and `"b"]`, as opposed to `a` and `b`.  If
parsing/conversion fails, it is treated as if it was a CSV.

Since the CSV approach required processing of each element, code was
refactored to reuse the same logic used for individual non-typed
variables.

Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-05-09 18:36:11 -06:00
Roberto Villarreal 5b8a3b3728 Allow variables to be explicitly typed (and enforced)
This allows variables to have explicit types, similar to Terraform
variables.  It uses HCL's `typeexpr` extension for the specification.
For conversion of overrides to complex types (when explicit typing is
provided), HCL's native JSON-based unmarshalling is used.

Typing is independent of any default, but if a default is provided, it
will be validated.  Similarly, if an override is provided, it will be
converted to that type.

When typing is not provided, previous behavior is used, namely
passing through as a string when no default, converting to primitives if
 the default was primitive, and failing otherwise (complex types).

For complex types, the happy path is lists of primitives, but in theory
any complex/composite type can be used provided they are expressed
correctly in JSON.  In the interest of simplicity and correctness, there
 are no shortcuts for lists.  There *is* a shortcut for strings as users
  don't provide them for untyped variables and would be unintuitive.

Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-05-09 18:36:11 -06:00
Guillaume Lours acdf95fe75 bump compose-go to v2.6.2
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-05-07 15:29:18 +02:00
Tõnis TiigiandGitHub 9e17bc7a4c Merge pull request #3127 from sarahsanders-docker/docs-buildx-history
docs: add descriptions and examples for buildx history commands
2025-05-05 15:00:01 -07:00
Tonis Tiigi e1e8f5c68d docs: updated reference docs generation
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-05 14:32:03 -07:00
sarahsanders-dockerandTonis Tiigi 6ed39b2618 fix examples and headings
Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
2025-05-05 14:32:03 -07:00
sarahsanders-dockerandTonis Tiigi 03019049e8 addressed feedback
Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
2025-05-05 14:32:03 -07:00
sarahsanders-dockerandTonis Tiigi 23ce21c341 feedback + updated examples + added links for h3 headings
Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
2025-05-05 14:32:03 -07:00
sarahsanders-dockerandTonis Tiigi 4dac5295a1 Add descriptions and examples for buildx history commands
Signed-off-by: sarahsanders-docker <sarah.sanders@docker.com>
2025-05-05 14:32:03 -07:00
Tonis Tiigi b00dd42037 bake: fix nil deference on empty call definition
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
2025-05-05 11:07:54 -07:00
Tõnis TiigiandGitHub 9a48aca461 Merge pull request #3136 from ctalledo/reworked-fix-for-moby-45458
Output correct image ID when using Docker with the containerd-snapshotter
2025-05-01 16:59:42 -07:00
Cesar Talledo 679407862f Output correct image ID when using Docker with the containerd-snapshotter.
Prior to this change, the following command emits the wrong image ID when buildx
uses the "docker-container" driver and Docker is configured with the
containerd-snapshotter.

$ docker buildx build --load --iidfile=img.txt

$ docker run --rm "$(cat img.txt)" echo hello
docker: Error response from daemon: No such image: sha256:4ac37e81e00f242010e42f3251094e47de6100e01d25e9bd0feac6b8906976df.
See 'docker run --help'.

The problem is that buildx is outputing the incorrect image ID in this scenario
(it's outputing the container image config digest, instead of the container
image digest used by the containerd-snapshotter).

This commit fixes this. See https://github.com/moby/moby/issues/45458.

Signed-off-by: Cesar Talledo <cesar.talledo@docker.com>
2025-05-01 16:33:22 -07:00
Tõnis TiigiandGitHub 674cfff1a4 Merge pull request #3165 from tonistiigi/fix-openbsd-ci
attempt openbsd fix
2025-05-01 11:29:09 -07:00