5388 Commits

Author SHA1 Message Date
Roberto Villarreal
04b8ac5fe4 Unquote volume names in creation events
Volumes are the only resources that are quoted, and only on creation.

Signed-off-by: Roberto Villarreal <rrjjvv@yahoo.com>
2025-08-29 11:50:42 +02:00
dependabot[bot]
d09948da41 build(deps): bump github.com/stretchr/testify from 1.10.0 to 1.11.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.10.0 to 1.11.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.10.0...v1.11.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-version: 1.11.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-29 08:28:51 +02:00
Sebastiaan van Stijn
f1efbb8322 use enum-consts for State and Health
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-29 08:18:16 +02:00
Sebastiaan van Stijn
1d52012b82 go.mod: bump buildkit v0.24.0-rc1, buildx v0.28.0-rc1
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-29 08:16:23 +02:00
Sebastiaan van Stijn
1d69f4a68c pkg/compose: composeService.Up: rewrite without go-multierror
- Use a errgroup.Group and add a appendErr utility to not fail-fast,
  but collect errors.
- replace doneCh for a global context to cancel goroutines
- Commented out attachCtx code, as it didn't appear to be functional
  (as it wouldn't be cancelled).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-27 15:25:17 +02:00
Kian Eliasi
6078b4d99d Fix: use image created time when last tag time is not present
Signed-off-by: Kian Eliasi <kian.elbo@gmail.com>
2025-08-27 09:03:58 +02:00
Kian Eliasi
73e593e69a Fix: incorrect time when last tag time is not set
Signed-off-by: Kian Eliasi <kian.elbo@gmail.com>
2025-08-27 09:03:58 +02:00
Sebastiaan van Stijn
51499f645b pkg/compose: pull: use native multi-errors
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 11:22:25 +02:00
Sebastiaan van Stijn
5165b0f814 internal/tracing: replace go-multierror.Group with sync.WaitGroup
The go-multierror Group is just a shallow wrapper around sync.WaitGroup;
https://github.com/hashicorp/go-multierror/blob/v1.1.1/group.go#L5-L38

This patch replaces the go-multierror.Group for a sync.WaitGroup (we
probably don't need to limit concurrency for this one) and stdlib multi-
errors.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 11:22:25 +02:00
Sebastiaan van Stijn
93dd1a4558 internal/sync: replace go-multierror.Group with golang.org/x/sync/errgroup
The go-multierror Group is just a shallow wrapper around sync.WaitGroup;
https://github.com/hashicorp/go-multierror/blob/v1.1.1/group.go#L5-L38

It does not limit concurrency, but handles synchronisation to collect
all errors (if any) in a go-multierror.

This patch replaces the go-multierror.Group for a sync.ErrGroup (which
is slightly easier to use, and does allow for limiting concurrency if
wanted), and a basic slice with mutex to collect the errors and to produce
a stdlib multi-error through errors.Join

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 11:22:25 +02:00
Sebastiaan van Stijn
ba3f5664c0 cmd/formatter: remove unused SetMultiErrorFormat
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 11:22:25 +02:00
Guillaume Lours
c420bc44c4 check the assume yes publish flag command before the presence of bind mounts
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-08-25 10:29:52 +02:00
Max Proske
60681a824c Add e2e test to verify docker compose down works even when env file is missing
Signed-off-by: Max Proske <max@mproske.com>
2025-08-25 10:03:55 +02:00
Max Proske
19ad737ee7 Fix runtime ops with missing env file
Signed-off-by: Max Proske <max@mproske.com>
2025-08-25 10:03:55 +02:00
may
d3a260e533 add completions for the --progress flag
Signed-off-by: may <m4rch3n1ng@gmail.com>
2025-08-25 10:01:49 +02:00
dependabot[bot]
e75329dce2 build(deps): bump go.uber.org/mock from 0.5.2 to 0.6.0
Bumps [go.uber.org/mock](https://github.com/uber/mock) from 0.5.2 to 0.6.0.
- [Release notes](https://github.com/uber/mock/releases)
- [Changelog](https://github.com/uber-go/mock/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uber/mock/compare/v0.5.2...v0.6.0)

---
updated-dependencies:
- dependency-name: go.uber.org/mock
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-25 09:50:16 +02:00
Sebastiaan van Stijn
1dc0be2c30 go.mod: github.com/docker/buildx v0.27.0
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-25 09:36:33 +02:00
cuiweixie
3bac9ffd08 Refactor to use maps.Copy
Signed-off-by: cuiweixie <cuiweixie@gmail.com>
2025-08-25 08:57:52 +02:00
Guillaume Lours
f266715dd0 add --provenance and --sbom flag to generated bake command line,
also add attestation per-service configuration to generated bake target

Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-08-13 09:36:22 +02:00
Guillaume Lours
c2cb0aef6b only monitor attached services on up command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
v2.39.2
2025-08-08 17:27:08 +02:00
Austin Vazquez
fbc62d111e bump golang to 1.23.12
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
2025-08-08 16:22:30 +02:00
dependabot[bot]
0d40064ce8 build(deps): bump golang.org/x/sys from 0.34.0 to 0.35.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.34.0 to 0.35.0.
- [Commits](https://github.com/golang/sys/compare/v0.34.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sys
  dependency-version: 0.35.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 14:22:18 +02:00
dependabot[bot]
91a6eafa1d build(deps): bump github.com/docker/go-connections from 0.5.0 to 0.6.0
Bumps [github.com/docker/go-connections](https://github.com/docker/go-connections) from 0.5.0 to 0.6.0.
- [Commits](https://github.com/docker/go-connections/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: github.com/docker/go-connections
  dependency-version: 0.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-08 14:08:26 +02:00
Matthew Runyon
f36ee00f71 Add go as a prerequesite in build instructions
Signed-off-by: Matthew Runyon <matthewrunyon@deephaven.io>
2025-08-06 15:27:09 +02:00
dependabot[bot]
29ede3ba7d build(deps): bump github.com/containerd/containerd/v2
Bumps [github.com/containerd/containerd/v2](https://github.com/containerd/containerd) from 2.1.3 to 2.1.4.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v2.1.3...v2.1.4)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd/v2
  dependency-version: 2.1.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-06 13:55:31 +02:00
Guillaume Lours
bf6d7bf47e define pull and no_cache from either service or flags values when building with bake
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-08-05 13:52:43 +02:00
Sebastiaan van Stijn
fc66da06db pkg/compose: simplify getting auth-config key
Rewrite to remove the `github.com/docker/docker/registry` dependency,
which will not be included in the upcoming "api" and "client" modules,
and will not be a public package in the module used for the daemon itself.

1. don't call "/info" API endpoint to get default registry

The `IndexServerAddress` in the `/info` endpoint was added as part of the
initial Windows implementation of the engine. For legal reasons, Microsoft
Windows (and thus Docker images based on Windows) were not allowed to be
distributed through non-Microsoft infrastructure. As a temporary solution,
a dedicated "registry-win-tp3.docker.io" registry was created to serve
Windows images.

Using separate registries was not an ideal solution, and a more permanent
solution was created by introducing "foreign image layers" in the distribution
spec, after which the "registry-win-tp3.docker.io" ceased to exist, and
removed from the engine through docker/docker PR 21100.

However, the `ElectAuthServer` was left in place, quoting from that PR;

> make the client check which default registry the daemon uses is still
> more correct than leaving it up to the client, even if it won't technically
> matter after this PR. There may be some backward compatibility scenarios
> where `ElectAuthServer` [sic] is still helpful.

That comment was 10 Years ago, and the CLI stopped using this information,
as the default registry is not configurable, so in practice was a static
value. (see b4ca1c7368).

2. replace `ParseRepositoryInfo` and `GetAuthConfigKey` with local impl

The `ParseRepositoryInfo` function was originally implemented for use by
the daemon itself. It returns a `RepositoryInfo` struct that holds information
about the repository and the registry the repository can be found in.

As it was written for use by the daemon, it also was designed to be used
in combination with the daemon's configuration (such as mirrors, and
insecure registries). If no daemon configuration is present, which would
be the case when used in a CLI, it uses fallback logic as used in the daemon
to detect if the registry is running on a localhost / loopback address,
because such addresses are allowed to be "insecure" by default; this includes
resolving the IP-address of the host (if it's not an IP-address).

Unfortunately, these functions (and related types) were reused in the
CLI and many other places, which resulted in those types to be deeply
ingrained in interfaces and (external) code.

For compose; it was only used to get the "auth-config key" to use for
looking up auth information from the credentials store, which still
needs special handling for the "default" (docker hub) domain, which
unlike other image references doesn't use the hostname included in
the image reference for the actual registry (and key for storing
auth).

For those that want to follow along;

First, note that `GetAuthConfig` only requires a `registry.IndexInfo`, so not
the whole `RepositoryInfo` struct;
https://github.com/moby/moby/blob/v28.3.3/registry/types.go#L8-L24

From the `registry.IndexInfo` it only uses the `IsOfficial` and `Name` fields;
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L390-L395

But to get the `IndexInfo`, `ParseRepositoryInfo` is needed, which first
takes the image reference's "domain name" (e.g. `docker.io`);
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L421

This gets "normalized" for some cases where the `info.IndexServerAddress`
was incorrectly assumed to be the canonical domain for Docker Hub registry,
and which _does_ happen to also be accessible as a "v2" registry.
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L334-L341

After normalizing, it checks if it's a docker hub address ("docker.io"
after normalizing); Docker Hub is always required to use a secure
connection, so no detection happens, and the `Official` field is set
to indicate it's Docker Hub (this code path was already simplified
as historically it would try to find daemon configuration (or otherwise
use a default) for Mirror configuration;
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L420-L443

For non-Docker Hub registries, it also sets the name, and attempts
to detect if the registry is allowed to be "insecure";
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L435-L442

Which (as mentioned) involves parsing the address and, if needed, resolving
the hostname
https://github.com/moby/moby/blob/v28.3.3/registry/config.go#L445-L481

As `Insecure` is not used for looking up the auth-config key, all of the
above can be reduced to;

- Is the hostname obtained from the image reference "docker.io" (after normalizing)?
- If so, use the special `https://index.docker.io/v1/` as auth-config key (another horrible remnant)
- Otherwise use the hostname obtained from the image reference as-is

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-05 10:08:23 +02:00
Sebastiaan van Stijn
909211dd61 use cli-plugins/metadata package
The metadata types and consts where moved to a separate package,
so update the code to use the new location instead of the aliases
provided.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-05 10:01:53 +02:00
dependabot[bot]
0dc9852c67 build(deps): bump github.com/docker/docker
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 28.3.2+incompatible to 28.3.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v28.3.2...v28.3.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-version: 28.3.3+incompatible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-30 11:39:57 +02:00
dependabot[bot]
a478702236 build(deps): bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 28.3.2+incompatible to 28.3.3+incompatible.
- [Commits](https://github.com/docker/cli/compare/v28.3.2...v28.3.3)

---
updated-dependencies:
- dependency-name: github.com/docker/cli
  dependency-version: 28.3.3+incompatible
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-30 11:27:29 +02:00
Nicolas De Loof
2c12ad19db use log API for containers we didn't attached to
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-07-29 14:23:24 +02:00
Guillaume Lours
038ea8441a apply BUILDKIT_PROGRESS value when building with bake
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-29 11:45:33 +02:00
Guillaume Lours
9e98e6101e add missing _MODEL suffix to model variable pass to dependent services of a model
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-29 09:40:46 +02:00
keitosuwahara
52f04229c0 fixed lint error
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-28 10:07:03 +02:00
keitosuwahara
28895d0322 fix lint error
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-28 10:07:03 +02:00
keitosuwahara
a926f7d717 Elimneted magic string
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-28 10:07:03 +02:00
Nicolas De Loof
fe046915eb buildkit require os.Stdout to access the raw terminal
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2025-07-28 09:25:35 +02:00
keitosuwahara
adbd61e5d6 fixed lint error
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 19:36:40 +02:00
keitosuwahara
e37ac04329 deleted useless comment
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 19:36:40 +02:00
keitosuwahara
cab2c2a44e Refactoring of redundant condition checks
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 19:36:40 +02:00
keitosuwahara
1946de598d improved lint error
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 15:12:38 +02:00
keitosuwahara
8e29a138aa improved test
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 15:12:38 +02:00
keitosuwahara
3c8da0afee Add test of json.go
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 15:12:38 +02:00
keitosuwahara
1b12c867c5 add Streams Comment
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-27 14:57:43 +02:00
Guillaume Lours
1a4fc55fd7 bump compose-go to v2.8.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
v2.39.1
2025-07-24 18:10:41 +02:00
Guillaume Lours
efc939dcee add info about models usage to OpenTelemetry spans
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-24 16:01:28 +02:00
keitosuwahara
d6e9f79ba6 Integration of SetAttributes calls
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
v2.39.0
2025-07-24 09:05:30 +02:00
keitosuwahara
b4c44a431f Eliminate magic number in init functions
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-24 09:04:52 +02:00
keitosuwahara
fb5a8644c3 Efficiency of ansiColorCode function
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
2025-07-24 09:04:02 +02:00
Guillaume Lours
95660c5e5a bump buildx to v0.26.1
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2025-07-23 16:01:28 +02:00