Commit Graph
5432 Commits
Author SHA1 Message Date
Sebastiaan van Stijn 713de5bb9e pkg/compose: explicitly map AuthConfig fields instead of a direct cast
Commit [cli@27b2797] forked the AuthConfig type from the API, and changed
existing code to do a direct cast / convert of the forked type to the API
type. This can cause issues if the API types diverges, such as the removal
of the Email field.

This patch explicitly maps each field to the corresponding API type, but
adds some TODOs, because various code-paths only included a subset of the
fields, which may be intentional for fields that were meant to be handled
on the daemon / registry-client only.

We should evaluate these conversions to make sure these fields should
be sent from the client or not (and possibly even removed from the API
type).

[cli@27b2797]: https://github.com/docker/cli/commit/27b2797f7deb3ca5b7f80371d825113deb1faca1

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-29 15:24:42 +02:00
Sebastiaan van Stijn 9ded1684cd gha: update test-matrix: remove docker 26.x
- Mirantis Container Runtime (MCR) 23.0 reached EOL, and the next LTS
  version of MCR is 25.x, but download.docker.com does not have 25.x
  packages for the latest Ubuntu release.
- Docker 26.x reached EOL and is no longer maintained

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-29 14:27:41 +02:00
Guillaume Lours 8bc8593fd0 provider services: use '--project-name=' notation
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-29 12:38:10 +02:00
Nicolas De Loof 8978c1027d use containerd registry client
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-26 18:45:07 +02:00
Sebastiaan van Stijn 032e0309ee cmd: pluginMain: use WithUserAgent option
Rewrite the custom user agent to use the new options that were added
in the cli:

- plugin.Run now accepts custom CLI options to allow customizing the CLI's
- cli/command now has a WithUserAgent option to customize the CLI's user-
  agent, allowing it to be overridden from the default.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-25 16:50:44 +02:00
Sebastiaan van Stijn 38ba35e165 pkg/mocks: re-generate mocks
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-25 16:50:44 +02:00
Sebastiaan van Stijn 56e0ba8080 build(deps): bump github.com/docker/docker, docker/cli v28.5.0-rc.1
full diff:

- https://github.com/docker/cli/compare/v28.4.0...v28.5.0-rc.1
- https://github.com/docker/docker/compare/v28.4.0...v28.5.0-rc.1

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-25 16:50:44 +02:00
Sebastiaan van Stijn 9752fa5500 pluginMain: remove uses of DockerCLI.Apply
The Apply method was added when CLI options for constructing the CLI were
rewritten into functional options in [cli@7f207f3]. There was no mention
in the pull request of this method specifically, and we want to remove or
reduce functions that mutate the CLI configuration after initialization
if possible (and likely remove the `Apply` method).

This patch removes the use of the `Apply` function as an intermediate step;
improvements will be made in the CLI itself for a more solid implementation.

[cli@7f207f3]: https://github.com/docker/cli/commit/7f207f3f957ed3f5129aeb22bef2a429c14caf22

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-24 14:09:55 +02:00
Sebastiaan van Stijn 4761fd88b0 pkg/compose: build: remove permissions warning on Windows
This warning was added in [moby@4a8b3ca] to print a warning when building
Linux images from a Windows client. Window's filesystem does not have an
"executable" bit, which mean that, for example, copying a shell script
to an image during build would lose the executable bit. So for Windows
clients, the executable bit would be set on all files, unconditionally.

Originally this was detected in the client, which had direct access to
the API response headers, but when refactoring the client to use a common
library in [moby@535c4c9], this was refactored into a `ImageBuildResponse`
wrapper, deconstructing the API response into an `io.Reader` and a string
field containing only the `OSType` header.

This was the only use and only purpose of the `OSType` field, and now that
BuildKit is the default builder for Linux images, this warning didn't get
printed unless BuildKit was explicitly disabled.

This patch removes the warning, so that we can potentially remove the
field, or the `ImageBuildResponse` type altogether.

[moby@4a8b3ca]: https://github.com/moby/moby/commit/4a8b3cad6096854027151dfbcfb4b2cd8841ad95
[moby@535c4c9]: https://github.com/moby/moby/commit/535c4c9a59b1e58c897677d6948a595cb3d28639

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-24 10:26:05 +02:00
Sebastiaan van Stijn 02c8e63545 pkg/watch: remove unused IsWindowsShortReadError
This function was added in b3615d64e2 but
appears to be unused.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-24 09:29:27 +02:00
Sebastiaan van Stijn ab7a6e9322 pkg/compose: remove uses of deprecated mitchellh/mapstructure module
The github.com/mitchellh/mapstructure module was archived and is no longer
maintained. This module has moved to github.com/go-viper/mapstructure,
which updated to v2, with a minor breaking change in v2.0;

> Error is removed in favor of errors.Join (backported from Go 1.20 to
> preserve compatibility with earlier versions)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-24 09:21:40 +02:00
Nicolas De Loof 2ca7b96e33 resolve secrets based on env var before executing bake
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-22 14:56:15 +02:00
Ricardo Branco a32dc3da72 test: Set stop_signal to SIGTERM
The official nginx images set STOPSIGNAL to SIGQUIT which dumps core.
Set it to SIGTERM to avoid dumping core on e2e tests.

Signed-off-by: Ricardo Branco <[email protected]>
v2.39.4
2025-09-19 10:31:20 +02:00
Guillaume Lours db260938c1 bump compose-go to version v2.9.0
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-19 10:13:08 +02:00
Guillaume LoursandNicolas De loof 5aea94794c Update comment on run command with tty & piped command
Co-authored-by: Nicolas De loof <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-19 09:51:15 +02:00
Guillaume Lours d07c437ce8 dectect if piped run command and disable tty if so
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-19 09:51:15 +02:00
Guillaume Lours da72230c39 remove tty attribute from run options and use dedicated variable to avoid confusion
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-19 09:51:15 +02:00
Nicolas De Loof a429c09dfa fix support for build with bake when target docker endpoint requires TLS
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-18 11:16:47 +02:00
Guillaume Lours df3c27c864 add deprecation warning for x-initialSync + e2e test
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-18 11:06:44 +02:00
Guillaume Lours 956891af54 add support of develop.watch.initial_sync attribute
Signed-off-by: Guillaume Lours <[email protected]>
2025-09-18 11:06:44 +02:00
Nicolas De Loof a473341058 volume ls command can run without a project
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-10 09:41:47 +02:00
Guillaume Lours 385b3f5c96 bump compose-go to version v2.8.2
Signed-off-by: Guillaume Lours <[email protected]>
v2.39.3
2025-09-08 18:07:00 +02:00
Nicolas De Loof 2d482e61ce propagate docker endpoint to bake using DOCKER_* env variables
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 17:54:55 +02:00
Nicolas De loofandAllie Sadler c75418ee07 Apply suggestions from code review
Co-authored-by: Allie Sadler <[email protected]>
Signed-off-by: Nicolas De loof <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 15:56:55 +02:00
Nicolas De Loof 0cdc5c9bff rename --no-TTY => --no-tty for consistency
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 15:56:55 +02:00
Nicolas De Loof b768232c0e document (hidden) --tty --interactive flags
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 15:56:55 +02:00
Nicolas De Loof 09689400e5 fix run --build support for service:* reference in additional_context
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 15:10:29 +02:00
Nicolas De Loof cb3691154b detect container is restarted
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 15:03:18 +02:00
Nicolas De Loof b387ba4a05 only load COMPOSE_* from $PWD/.env
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 14:40:49 +02:00
Nicolas De Loof 7cd569922e only propagate os.Env to bake, not the whole project.Environment
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 14:40:49 +02:00
Nicolas De Loof eec2bb7ea6 only force plain mode build if progress is set to auto
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-08 14:17:04 +02:00
dependabot[bot] 2c15aef2ed build(deps): bump golang.org/x/sys from 0.35.0 to 0.36.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.35.0 to 0.36.0.
- [Commits](https://github.com/golang/sys/compare/v0.35.0...v0.36.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 13:49:29 +02:00
dependabot[bot] 290366205b build(deps): bump golang.org/x/sync from 0.16.0 to 0.17.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.16.0 to 0.17.0.
- [Commits](https://github.com/golang/sync/compare/v0.16.0...v0.17.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-08 13:33:10 +02:00
Guillaume Lours a91ca95a71 bump golang to version 1.24.7
to align with moby/moby version

Signed-off-by: Guillaume Lours <[email protected]>
2025-09-08 12:05:41 +02:00
Sebastiaan van Stijn beb81a73f9 pkg/compose: remove aliases for container-state consts
These are no longer used, and have no known external consumers.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-08 11:52:28 +02:00
Sebastiaan van Stijn f217207876 pkg/compose: use state consts from moby API
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-08 11:52:28 +02:00
Nicolas De Loof 02ffe2ac6c prefer application container vs one-off running exec without index
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-07 14:41:34 +02:00
dependabot[bot] f48131fb66 build(deps): bump github.com/spf13/pflag from 1.0.9 to 1.0.10
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.9 to 1.0.10.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.9...v1.0.10)

---
updated-dependencies:
- dependency-name: github.com/spf13/pflag
  dependency-version: 1.0.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-07 14:37:04 +02:00
Nicolas De Loof 4dd369bdcb fix sigint/sigterm support in logs --follow
Signed-off-by: Nicolas De Loof <[email protected]>
2025-09-07 14:19:56 +02:00
dependabot[bot] ad73766bf2 build(deps): bump github.com/docker/buildx from 0.28.0-rc2 to 0.28.0
Bumps [github.com/docker/buildx](https://github.com/docker/buildx) from 0.28.0-rc2 to 0.28.0.
- [Release notes](https://github.com/docker/buildx/releases)
- [Commits](https://github.com/docker/buildx/compare/v0.28.0-rc2...v0.28.0)

---
updated-dependencies:
- dependency-name: github.com/docker/buildx
  dependency-version: 0.28.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-05 08:38:23 +02:00
Sebastiaan van Stijn 3c1f5a1815 go.mod: bump github.com/docker/docker, docker/cli v28.4.0
full diffs:

- https://github.com/docker/docker/compare/v28.3.3...v28.4.0
- https://github.com/docker/cli/compare/v28.3.3...v28.4.0
- https://github.com/moby/buildkit/compare/v0.24.0-rc2...v0.24.0

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-04 15:23:59 +02:00
dependabot[bot] 42d1e4c333 build(deps): bump github.com/spf13/cobra from 1.9.1 to 1.10.1
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.9.1 to 1.10.1.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Commits](https://github.com/spf13/cobra/compare/v1.9.1...v1.10.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-version: 1.10.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-03 14:44:38 +02:00
dependabot[bot] 6ca8663bda build(deps): bump github.com/spf13/pflag from 1.0.7 to 1.0.9
Bumps [github.com/spf13/pflag](https://github.com/spf13/pflag) from 1.0.7 to 1.0.9.
- [Release notes](https://github.com/spf13/pflag/releases)
- [Commits](https://github.com/spf13/pflag/compare/v1.0.7...v1.0.9)

---
updated-dependencies:
- dependency-name: github.com/spf13/pflag
  dependency-version: 1.0.9
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2025-09-02 15:46:14 +02:00
Sebastiaan van Stijn b33ecf65e8 go.mod: bump buildx v0.28.0-rc2, buildkit v0.24.0-rc2
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-09-02 07:28:06 +02:00
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 <[email protected]>
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] <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
2025-08-27 09:03:58 +02:00