46 Commits
Author SHA1 Message Date
Max Proske 0b9fb4fef9 PRIVATE_PORT optional for docker compose port
Signed-off-by: Max Proske <[email protected]>
2026-09-11 11:35:18 +02:00
Nicolas De Loof 6443bc1da2 chore(mocks): fix the stale mockgen invocation and pin its version
The `mocks` target still passed the pre-rename `Service` argument to
mockgen (the interface is `Compose` since the rename) and installed
whatever mockgen happened to be on PATH. Run it through `go run` with a
pinned version so regeneration is reproducible; v0.4.0 is the last
version usable here, as the package mode introduced in v0.5 copies
parameter names from the mocked source and moby's APIClient names its
variadic options `_`, which produces invalid Go code.

Regenerated pkg/mocks with the fixed invocation (header-only change).

Signed-off-by: Nicolas De Loof <[email protected]>
2026-08-20 15:16:43 +02:00
Sebastiaan van Stijn 81867eafa5 chore(deps): github.com/docker/cli v29.6.0
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-22 09:00:18 +02:00
Sebastiaan van Stijn bfb5511d0d go.mod: bump github.com/moby/moby/api v1.53.0, moby/client v0.2.2
Also update TestDefaultNetworkSettings:
Test that the network with the highest priority is returned as
"primary" network, and other networks as extra networks.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-02-11 12:32:37 +01:00
Nicolas De Loof 2b4543935c next release will be major version v5.x
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-13 09:32:43 +01:00
Nicolas De Loof fc2a7d13fa from Compose CLI, we know the streams used to configure LogConsumer
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-04 10:25:14 +01:00
Guillaume Lours d74274bc04 Add LoadProject method to Compose SDK API
This commit adds a new LoadProject method to the Compose service API,
allowing SDK users to programmatically load Compose projects with full
control over the loading process.

Changes:

1. New API method (pkg/api/api.go):
   - LoadProject(ctx, ProjectLoadOptions) (*types.Project, error)
   - ProjectLoadOptions struct with all loader configuration
   - LoadListener callback for event notifications (metrics, etc.)
   - ProjectOptionsFns field for compose-go loader options

2. Implementation (pkg/compose/loader.go):
   - createRemoteLoaders: Git and OCI remote loader setup
   - buildProjectOptions: Translates ProjectLoadOptions to compose-go options
   - postProcessProject: Service filtering, labels, resource pruning

3. Unit test (pkg/compose/loader_test.go):
   - Tests basic project loading functionality
   - Verifies ProjectOptionsFns with cli.WithoutEnvironmentResolution

4. Mock update (pkg/mocks/mock_docker_compose_api.go):
   - Added LoadProject to mock interface

Key design decisions:
- LoadListener pattern keeps metrics collection in CLI, not SDK
- ProjectOptionsFns exposes compose-go options directly (e.g., cli.WithInterpolation(false))
- Post-processing in SDK: labels, service filtering, resource pruning
- Environment resolution NOT in SDK (command responsibility)
- Compatibility mode handling (api.Separator)

Signed-off-by: Guillaume Lours <[email protected]>
2025-11-03 08:58:30 +01: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
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
Nicolas De Loof 29308cb97e keep containers attached on stop to capture termination logs
Signed-off-by: Nicolas De Loof <[email protected]>
2025-07-15 11:26:44 +02:00
Leonardo Peregrino 5430caa172 add volumes command
Signed-off-by: Leonardo Peregrino <[email protected]>
2025-06-30 19:38:27 +02:00
Nicolas De Loof 9b67a48c33 (refactoting) Move watch logic into a dedicated Watcher type
Signed-off-by: Nicolas De Loof <[email protected]>
2025-06-05 16:48:05 +02:00
Nicolas De Loof eb3074bbda include platform and creation date listing image used by running compose application
Signed-off-by: Nicolas De Loof <[email protected]>
2025-06-02 16:07:24 +02:00
Sebastiaan van Stijn 20f780e95a make the mocks generator happy
Seems like it resolves the alias, and uses that instead, instead of
the actual type.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-02-21 15:23:25 +01:00
Sebastiaan van StijnandNicolas De Loof cf2fc2005c go.mod: docker/docker, docker/cli v28.0.0, buildx v0.21.1
full diff:

- https://github.com/docker/docker/compare/v27.5.1...v28.0.0
- https://github.com/docker/cli/compare/v27.5.1...v28.0.0
- https://github.com/docker/buildx/compare/v0.20.1...v0.21.1

Co-authored-by: Nicolas De Loof <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-02-21 15:23:25 +01:00
MohammadHasan Akbari 9eaba55973 feat: add commit command
Signed-off-by: MohammadHasan Akbari <[email protected]>
2024-11-27 07:39:46 +01:00
Guillaume Lours 51ebeb5441 introduce generate command as alpha command
Signed-off-by: Guillaume Lours <[email protected]>
2024-10-28 17:00:59 +01:00
MohammadHasan Akbari b9d0c77cde feat: add export command
Signed-off-by: MohammadHasan Akbari <[email protected]>
2024-10-02 21:15:59 +02:00
Albin KerouantonandAlbin Kerouanton <[email protected] 2636dcf064 go.mod: docker/docker and docker/cli v27.0.1-rc.1
diffs:

- https://github.com/docker/cli/compare/v26.1.4..v27.0.1-rc.1
- https://github.com/docker/docker/compare/v26.1.4..v27.0.1-rc.1

Co-authored-by: Albin Kerouanton <[email protected]
Signed-off-by: Albin Kerouanton <[email protected]
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2024-06-21 14:04:40 +02:00
Guillaume Lours da8189cf22 Bump docker engine and cli to version 26.1.3
Signed-off-by: Guillaume Lours <[email protected]>
2024-05-17 13:18:14 +02:00
Milas Bowman b90cb48a1d chore(deps): update to Moby v26.1 & buildx v0.14
* `moby/buildkit` commit comes from `docker/buildx`
* v26.1-dev from `moby/moby` & `docker/cli`

Signed-off-by: Milas Bowman <[email protected]>
2024-04-24 10:57:11 +02:00
Wes Higbee dcf6bd779f make mocks
Signed-off-by: Wes Higbee <[email protected]>
2024-01-08 17:15:11 -06:00
Laura Brehm 7781b7c992 deps: update docker/cli to fix go version selection issue
see: https://github.com/docker/cli/commit/70216b662dc440faaebab531deb35f0f0c633d17

Signed-off-by: Laura Brehm <[email protected]>
2023-12-19 14:15:16 +00:00
Nicolas De Loof 74cc091225 github.com/golang/mock is deprecated
Signed-off-by: Nicolas De Loof <[email protected]>
2023-12-13 14:47:39 +01:00
Nicolas De Loof cda04f288e adopt compose-go/v2
Signed-off-by: Nicolas De Loof <[email protected]>
2023-12-05 18:54:31 +01:00
Guillaume Lours 1a98a70b8a add scale command
Signed-off-by: Guillaume Lours <[email protected]>
2023-09-13 11:15:14 +02:00
Nicolas De Loof e0f39ebbef pull OCI remote resource
Signed-off-by: Nicolas De Loof <[email protected]>
2023-09-07 07:27:32 +02:00
Nicolas De Loof c9d54f09cf introduce publish (alpha) command
Signed-off-by: Nicolas De Loof <[email protected]>
2023-09-07 07:27:32 +02:00
Ulysses Souza edd76bfd70 Add docker compose wait
Signed-off-by: Ulysses Souza <[email protected]>
2023-06-30 16:07:03 +02:00
Milas Bowman 37850f7955 ci: upgrade to Go 1.20.5 and Moby v24.x
Signed-off-by: Milas Bowman <[email protected]>
2023-06-07 10:41:49 -04:00
Benjamín Guzmán 7840a92c40 Added tests to viz subcommand
Signed-off-by: Benjamín Guzmán <[email protected]>
2023-04-24 12:18:37 +02:00
Guillaume Lours 70ab9f8f33 bump docker engine and cli version to 23.0.0 with buildkit(v0.11.2) and buildx (v0.10.2)
Signed-off-by: Guillaume Lours <[email protected]>
2023-02-08 10:11:50 +01:00
Nicolas De Loof 41e056341b rename convert to config to align with compose v1 UX
Signed-off-by: Nicolas De Loof <[email protected]>
2023-01-30 22:23:53 +01:00
Guillaume Lours 790712fa92 update tty and plain text writers to support dry run mode
Signed-off-by: Guillaume Lours <[email protected]>
2023-01-30 09:27:17 +01:00
Guillaume Lours 5081ab0507 create custom CLI when dry-run mode active
update documentation

Signed-off-by: Guillaume Lours <[email protected]>
2023-01-16 11:11:35 +01:00
Guillaume Lours 13ef440d6a add DryRun API Client with delagation pattern
Signed-off-by: Guillaume Lours <[email protected]>
2023-01-16 11:11:35 +01:00
Nicolas De Loof bb9cf32245 introduce experimental watch command (skeletton)
Signed-off-by: Nicolas De Loof <[email protected]>
2023-01-12 10:52:58 +01:00
Nicolas De Loof 0368f19030 distinguish stdout and stderr in up logs
Signed-off-by: Nicolas De Loof <[email protected]>
2022-12-13 14:42:42 +01:00
Nicolas De Loof a0acc20d88 introduce --parallel to limit concurrent engine calls
Signed-off-by: Nicolas De Loof <[email protected]>
2022-12-06 08:15:50 +01:00
Milas BowmanandNick Sieger 053f20edab port: improve error-handling if port not found (#10039)
This method looked slightly incomplete. If the port wasn't found,
it'd return `err`, but that was always `nil`, so we'd print out
`:0`.

Now, we construct a nice error message with the targeted port and
the ones we found.

The `--protocol` flag is also now case-insensitive to prevent any
weirdness/confusion there.

Co-authored-by: Nick Sieger <[email protected]>
Signed-off-by: Milas Bowman <[email protected]>
2022-12-05 22:11:45 +00:00
Guillaume Lours 3bf29d401c bump docker dependencies version
Signed-off-by: Guillaume Lours <[email protected]>
2022-10-18 16:26:54 +02:00
Nick Sieger 3599fc8533 mocks: create mocks for compose api.Service
Signed-off-by: Nick Sieger <[email protected]>
2022-06-07 17:09:06 -05:00
Nicolas De Loof 283f7a1ec5 Bump buildx to v0.8.0
Signed-off-by: Nicolas De Loof <[email protected]>
2022-03-11 14:05:55 +01:00
Nicolas De Loof f86f252a66 composeService to use dockerCli's In/Out/Err streams
Signed-off-by: Nicolas De Loof <[email protected]>
2022-03-03 16:34:57 +01:00
Nicolas De Loof 981aea674d bump buildx to 0.7.1
Signed-off-by: Nicolas De Loof <[email protected]>
2022-02-21 14:28:22 +01:00
Nicolas De Loof 49e7f2d45d Move compose v2 implementation under pkg/compose with dependencies
Signed-off-by: Nicolas De Loof <[email protected]>
2021-06-15 15:52:48 +02:00