Commit Graph
189 Commits
Author SHA1 Message Date
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
Guillaume Lours 6599f8ad84 add 'configured' event at the end of model configuration phase
Currently when using models, the final message is 'confugiring' which could let users think the DMR configuration is still pending

Signed-off-by: Guillaume Lours <[email protected]>

# Conflicts:
#	pkg/api/event.go
2025-12-15 10:14:21 +01:00
Nicolas De Loof 02008a0097 Restored image layer download progress details on pull.
Signed-off-by: Nicolas De Loof <[email protected]>
2025-12-12 14:22:02 +01:00
Nicolas De Loof c0345e4f45 restore support for COMPOSE_COMPATIBILITY
Signed-off-by: Nicolas De Loof <[email protected]>
2025-12-07 18:42:04 +01:00
Sebastiaan van Stijn dc66e6bad1 golangci-lint: use gci formatter instead of goimports
Most files already grouped imports into "stdlib -> other -> local",
but some files didn't. The gci formatter is similar to goimports, but
has better options to make sure imports are grouped in the expected
order (and to make sure no additional groups are present).

This formatter has a 'fix' function, so code can be re-formatted auto-
matically;

    golangci-lint run -v --fix

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-12-01 12:21:50 +01:00
Nicolas De Loof d7e5f20eb6 images command should display image Created time or N/A if not available
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-13 09:40:56 +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 45def51117 make DRYRUN_PREFIX a display attribute, move DryRunClient out of pkg/api
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-12 11:17:28 +01:00
Nicolas De Loof aff5c115d6 move progress UI components into cmd
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-12 11:17:28 +01:00
Jonty dc90c4e44d Grammatical fix
Signed-off-by: Jonty <[email protected]>
2025-11-10 11:34:18 +01:00
Jonty 91e1753d80 Grammatical fix
Signed-off-by: Jonty <[email protected]>
2025-11-10 11:34:18 +01:00
Jonty 9db27a65c6 Making the American/British spellings consistent to the error messages
Signed-off-by: Jonty <[email protected]>
2025-11-10 11:34:18 +01:00
Nicolas De Loof 7eb5adeef6 introduce --insecure-registry, reserved for testing purpose
Signed-off-by: Nicolas De Loof <[email protected]>
2025-11-06 16:17:21 +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
Guillaume Lours 3658a063bb add AlwaysOkPrompt to replace 'AlwaysYes' current implementation'
Signed-off-by: Guillaume Lours <[email protected]>
2025-11-03 08:01:59 +01:00
Guillaume Lours 8274be8d08 configure Compose service with io.Reader and io.Writer
remove usage of internal IO interfaces

Signed-off-by: Guillaume Lours <[email protected]>
2025-10-27 18:54:10 +01:00
Guillaume Lours 86e91e010d Add streamOverrideWrapper to intercepts command.Cli stream methods and transparently returns custom streams when provided via options
Add new GetConfiguredStreams function to Compose API definition

Signed-off-by: Guillaume Lours <[email protected]>
2025-10-27 16:17:50 +01:00
Guillaume Lours e1678c5c43 Introduce abstractions to support SDK usage without requiring Docker CLI
This commit prepares the Compose service for SDK usage by abstracting away
the hard dependency on command.Cli. The Docker CLI remains the standard path
for the CLI tool, but SDK users can now provide custom implementations of
streams and context information.

Signed-off-by: Guillaume Lours <[email protected]>
2025-10-27 16:17:50 +01:00
Nicolas De Loof 7f668bd7fe Setup Compose service using functional parameters
This commit introduces WithMaxConcurrency and WithDryRun to replace direct mutators on composeService
commands and flags are translated into a set of functional parameters which are eventually applied
as a ComposeService is created just before being actually used by a command

Signed-off-by: Nicolas De Loof <[email protected]>
2025-10-24 18:24:21 +02:00
Nicolas De Loof 9b4fcce034 introduce WithPrompt to configure compose backend to use a plugable UI component for user interaction
Signed-off-by: Nicolas De Loof <[email protected]>
2025-10-22 16:14:55 +02:00
Nicolas De Loof 07602f2070 publish Compose application as compose.yaml + images
Signed-off-by: Nicolas De Loof <[email protected]>
2025-10-03 10:59:57 +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
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
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
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
keitosuwahara adbd61e5d6 fixed lint error
Signed-off-by: keitosuwahara <[email protected]>
2025-07-27 19:36:40 +02:00
keitosuwahara e37ac04329 deleted useless comment
Signed-off-by: keitosuwahara <[email protected]>
2025-07-27 19:36:40 +02:00
keitosuwahara cab2c2a44e Refactoring of redundant condition checks
Signed-off-by: keitosuwahara <[email protected]>
2025-07-27 19:36:40 +02:00
keitosuwahara 1b12c867c5 add Streams Comment
Signed-off-by: keitosuwahara <[email protected]>
2025-07-27 14:57:43 +02:00
Nicolas De Loof fd954f266c show build progress during watch rebuild
Signed-off-by: Nicolas De Loof <[email protected]>
2025-07-23 13:57:46 +02:00
Nicolas De Loof 8f91793fb5 introduce build.provenance and sbom support
Signed-off-by: Nicolas De Loof <[email protected]>
2025-07-21 17:07:41 +02:00
Nicolas De Loof 1c37f1abb6 use logs API with Since to collect the very first logs after restart
Signed-off-by: Nicolas De Loof <[email protected]>
2025-07-16 17:24:11 +02:00
Nicolas De Loof 485b6200ee (refactoring) introduce monitor to manage containers events and application termination
Signed-off-by: Nicolas De Loof <[email protected]>
2025-07-16 17:24:11 +02:00
MohammadHasan AkbariandAmin Ehterami 35efa97b7d feat: add since & until flags to events command
Signed-off-by: MohammadHasan Akbari <[email protected]>
Co-authored-by: Amin Ehterami <[email protected]>
2025-07-09 10:08:33 +02:00
Leonardo Peregrino 3a7982fe45 add service filter to volumes command
Signed-off-by: Leonardo Peregrino <[email protected]>
2025-06-30 19:38:27 +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 276c229458 move run logic inside backend
Signed-off-by: Nicolas De Loof <[email protected]>
2025-06-13 14:43:16 +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 ad4cbee498 bump github.com/docker/docker, docker/cli v28.2.2
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2025-06-02 10:39:56 +02:00
tongjicoder 2e71440bee refactor: use slices.Contains to simplify code
Signed-off-by: tongjicoder <[email protected]>
2025-05-27 11:45:26 +02:00
Guillaume Lours 7e198ee6a3 remove provenance build flag for now
Signed-off-by: Guillaume Lours <[email protected]>
2025-05-20 18:21:05 +02:00
Guillaume Lours 0566431c64 only use attestation when building image outside the development inner loop
when building a image, by default attestation are generated and modify the image ID which trigger a container recreation on up, run command even if there isn't any changes on the image content itself

Signed-off-by: Guillaume Lours <[email protected]>
2025-05-20 18:21:05 +02:00
Guillaume Lours 944e5e67a1 do not throw an error on build with provider services
Signed-off-by: Guillaume Lours <[email protected]>
2025-05-16 17:47:09 +02:00
Nicolas De Loof 16e83f002d introduce build --check
Signed-off-by: Nicolas De Loof <[email protected]>
2025-05-06 07:54:30 +02:00
Nicolas De Loof 75368c7859 introduce build --print to dump equivalent bakefile
Signed-off-by: Nicolas De Loof <[email protected]>
2025-03-26 12:24:31 +01:00
Dominik Menke f70209cf15 review: move Summary/Replica collection from cmd/ to pkg/
Signed-off-by: Dominik Menke <[email protected]>
2025-03-13 14:23:51 +01:00
Dominik Menke 375a279785 top: expose container labels
Signed-off-by: Dominik Menke <[email protected]>
2025-03-13 14:23:51 +01:00
Nicolas De Loof 6c1ee1069b support refresh pull policy
Signed-off-by: Nicolas De Loof <[email protected]>
2025-02-25 17:05:23 +01:00