Commit Graph
5776 Commits
Author SHA1 Message Date
Sebastiaan van Stijn cd4f21647d chore(deps): golang.org/x/crypto v0.53.0
golang.org/x/crypto v0.52.0 has various fixes for vulnerabilities.
These do NOT impact docker compose, but may show up in vulnerability
scanners;

    govulncheck --version
    Go: go1.26.4
    Scanner: [email protected]
    DB: https://vuln.go.dev
    DB updated: 2026-06-02 21:39:47 +0000 UTC

    govulncheck -show verbose ./...
    Fetching vulnerabilities from the database...

    Checking the code against the vulnerabilities...

    === Package Results ===

    Vulnerability #1: GO-2026-5023
        Invoking VerifiedPublicKeyCallback permissions skip enforcement in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5023
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #2: GO-2026-5020
        Invoking infinite loop on large channel writes in golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5020
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #3: GO-2026-5019
        Invoking bypass of FIDO/U2F security keys physical interaction in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5019
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #4: GO-2026-5018
        Invoking pathological RSA/DSA parameters may cause DoS in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5018
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #5: GO-2026-5017
        Invoking client can cause server deadlock on unexpected responses in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5017
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #6: GO-2026-5016
        Invoking memory leak when rejecting channels can lead to DoS in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5016
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #7: GO-2026-5015
        Invoking server panic during CheckHostKey/Authenticate in
        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5015
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #8: GO-2026-5014
        Invoking bypass of certificate restrictions in golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5014
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #9: GO-2026-5013
        Invoking byte arithmetic causes underflow and panic in

        golang.org/x/crypto/ssh
      More info: https://pkg.go.dev/vuln/GO-2026-5013
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    === Module Results ===

    Vulnerability #1: GO-2026-5033
        Invoking pathological inputs can lead to client panic in
        golang.org/x/crypto/ssh/agent
      More info: https://pkg.go.dev/vuln/GO-2026-5033
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #2: GO-2026-5021
        Invoking auth bypass via unenforced @revoked status in
        golang.org/x/crypto/ssh/knownhosts
      More info: https://pkg.go.dev/vuln/GO-2026-5021
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #3: GO-2026-5006
        Invoking agent constraints dropped when forwarding keys in
        golang.org/x/crypto/ssh/agent
      More info: https://pkg.go.dev/vuln/GO-2026-5006
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Vulnerability #4: GO-2026-5005
        Invoking key constraints not enforced in golang.org/x/crypto/ssh/agent
      More info: https://pkg.go.dev/vuln/GO-2026-5005
      Module: golang.org/x/crypto
        Found in: golang.org/x/[email protected].0
        Fixed in: golang.org/x/[email protected].0

    Your code is affected by 2 vulnerabilities from 1 module.
    This scan also found 9 vulnerabilities in packages you import and 4
    vulnerabilities in modules you require, but your code doesn't appear to call
    these vulnerabilities.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-15 13:22:55 +02:00
dependabot[bot] 0094ece2e3 build(deps): bump golang.org/x/sys from 0.45.0 to 0.46.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.45.0 to 0.46.0.
- [Commits](https://github.com/golang/sys/compare/v0.45.0...v0.46.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-15 12:59:34 +02:00
Sebastiaan van Stijn df75f82a6b chore(deps): github.com/docker/buildx v0.34.1, buildkit v0.30.0
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-15 12:45:57 +02:00
Sebastiaan van Stijn cadb8dc6d9 chore(deps): github.com/docker/cli v29.5.3
Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-15 12:45:57 +02:00
dependabot[bot] 86744b571c build(deps): bump golang.org/x/sync from 0.20.0 to 0.21.0
Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.20.0 to 0.21.0.
- [Commits](https://github.com/golang/sync/compare/v0.20.0...v0.21.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
2026-06-15 12:10:37 +02:00
Sebastiaan van Stijn 8cf557ad06 chore(deps): github.com/containerd/typeurl/v2 v2.3.0
full diff: https://github.com/containerd/typeurl/compare/v2.2.3...v2.3.0

removes the github.com/gogo/protobuf dependency

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-15 11:56:24 +02:00
bigmomma 6ded3140df test: cover up remote-stack variable prompt
Signed-off-by: bigmomma <[email protected]>
2026-06-12 15:34:20 +02:00
bigmomma fc83fbfa9e Skip validation when extracting config variables
Signed-off-by: bigmomma <[email protected]>
2026-06-12 15:34:20 +02:00
Sebastiaan van Stijn 39ee1d02b6 docs: compose logs: add more links for flag descriptions
follow-up to 7eeb7de7a2, adding more
links now that the CLI reference for docker logs has anchors for them.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-10 09:36:31 +02:00
Sebastiaan van Stijn 79d63a8b84 gha: update docs-upstream to pin workflows by sha
This workflow was updated in 56e2dba366
but it looks to have pinned to a version before the workflows were
pinned; https://github.com/docker/docs/blob/464a44a6e72b37cf1755968477e242a5e5f6ef7d/.github/workflows/validate-upstream.yml

This patch updates the workflow to a version that uses pinned actions;
https://github.com/docker/docs/blob/00aefd5eae73898c4d3bcd7a6fe95a039293706b/.github/workflows/validate-upstream.yml

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-09 17:57:47 +02:00
solunolab be0c713ca5 chore: fix some comments to improve readability
Signed-off-by: solunolab <[email protected]>
2026-06-09 11:45:13 +02:00
Sebastiaan van Stijn a4ec1dcd89 update to go1.26.4
This release include 3 security fixes following the security policy:

- mime: quadratic complexity in WordDecoder.DecodeHeader

    Decoding a maliciously-crafted MIME header containing many invalid
    encoded-words could consume excessive CPU.
    The MIME decoder now better handles this case.

    Thanks to p4p3r (https://hackerone.com/p4p3r_hak) for reporting this issue.

    This is CVE-2026-42504 and Go issue https://go.dev/issue/79217.

- net/textproto: arbitrary input are included in errors without any escaping

    When returning errors, functions in the net/textproto package would
    include its input as part of the error, without any escaping. Note that
    said input is often controlled by external parties when using this
    package naturally. For example, a net/http client uses ReadMIMEHeader
    when parsing the headers it receive from a server.

    As a result, an attacker could inject arbitrary content into the error.
    Practically, this can result in an attacker injecting misleading
    content, terminal control bytes, etc. into a victim's output or logs.

    This is CVE-2026-42507 and Go issue https://go.dev/issue/79346

- crypto/x509: split candidate hostname only once

    (*x509.Certificate).VerifyHostname previously called matchHostnames in a loop
    over all DNS Subject Alternative Name (SAN) entries. This caused
    strings.Split(host, ".") to execute repeatedly on the same input hostname.

    With a large DNS SAN list, verification costs scaled quadratically based on the
    number of SAN entries multiplied by the hostname's label count. Because
    x509.Verify validates hostnames before building the certificate chain, this
    overhead occurred even for untrusted certificates.

    Thanks to Jakub Ciolek (https://ciolek.dev) for reporting this issue.

    This is CVE-2026-27145 and https://go.dev/issue/79694.

View the release notes for more information:
https://go.dev/doc/devel/release#go1.26.4

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-06-09 10:48:41 +02:00
Guillaume LoursandClaude Opus 4.7 77ec74ee67 reconcile: document the asymmetric removeDeps in planRecreateContainer
External reviewer noted that the alreadyStopped branch adds createNode
to removeDeps while the !alreadyStopped branch does not — semantically
correct but fragile, since it relies on the implicit invariant that
stopNode.DependsOn contains createNode in the !alreadyStopped path.

Spell out the invariant in a comment so a future maintainer who edits
the stop → create edge in the normal path knows they must also add
createNode unconditionally in the remove deps.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 750eb9b24e tests: cover depends_on chaining and OpRunProvider stringer
Two coverage gaps surfaced by an external review:

- TestReconcileContainers_DependsOnChain: asserts that a service B with
  depends_on: [A] produces a CreateContainer for B that depends on A's
  last plan node (the serviceNodes mechanism in infrastructureDeps).
  This was the only depends_on-via-plan-DAG behavior untested before.

- TestReconcileContainers_DependsOnScaleDown: companion test that
  exercises the scale-down → dependent path specifically, verifying
  that the previous commit's lastNode-on-scale-down fix actually wires
  the dependency through.

- TestOperationTypeString: adds OpRunProvider to the table; all other
  OperationType values were already covered.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 a06368c333 reconcile: fix scale-down propagation, surface hash errors, dedupe stops
Three fixes surfaced by an external code review of the new reconciler:

1. Scale-down now propagates through serviceNodes. When a service is
   scaled down (all containers in excess), reconcileService used to
   continue without assigning lastNode, leaving r.serviceNodes[svc]
   unset. Dependent services then declared no edge on the scale-down
   ops and could start before the cleanup finished. Track the
   RemoveContainer node as lastNode so depends_on chains pick it up.

2. mustRecreate errors are no longer silently ignored by sortContainers.
   The comparator used `obsi, _ := r.mustRecreate(...)`, falling back
   to false on any hashing error. Pre-compute obsolescence into a map
   keyed by container ID before sorting and propagate the error to
   reconcileService.

3. A container is no longer Stopped twice when its network and its
   config both diverge. planRecreateNetwork already stops the affected
   container as part of the disconnect/remove/recreate dance; the
   subsequent planRecreateContainer (triggered via hasNetworkMismatch)
   used to add another OpStopContainer against the now-stopped target.
   Track stops in r.stoppedByPlan; planRecreateContainer reuses an
   existing Stop node when present, and chains its Remove on both that
   Stop and the replacement Create.

Two golden tests (TestReconcileNetworks_Diverged*) are updated to
reflect the new, dedupe'd plan shape (one Stop instead of two per
recreated container).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 c96ee45f51 executor: split into ops + events files
executor.go had grown to ~480 lines mixing three concerns:

  - DAG orchestration (run, executeNode, planExecutor struct)
  - per-OpType implementations (execCreateNetwork, …, execRenameContainer)
  - event tracking (groupTracker + per-OpType emit helpers)

Split into three files of ~170 lines each, one concern per file:

  - executor.go        — planExecutor, reconciliationContext, run, executeNode dispatch
  - executor_ops.go    — all execXxx methods
  - executor_events.go — groupTracker + emitStartEvent / emitDoneEvent / emitErrorEvent

Pure refactor: no functional change. Tests (incl. -race) and lint both pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 4edd039ed0 executor: pay down technical debt from PE review
Three improvements identified in the Principal Engineer pass but
deliberately deferred:

1. Test fidelity. Split executePlan into newPlanExecutor (constructs
   the executor seeded from observed state) and (*planExecutor).run
   (walks the DAG). Production callers go through executePlan
   unchanged. TestExecutePlanRemoveContainerDropsFromCache now uses
   newPlanExecutor + run, exercising the same errgroup, done-channel
   and group-tracker wiring as production instead of a hand-rolled
   loop over executeNode.

2. //nolint:unused chain. The three preserved helpers
   (reconciler.prompt, planRecreateVolume, servicesUsingVolume) each
   carried a separate "kept for future" comment. Consolidate the
   rationale on the reconciler.prompt field doc and point the helper
   nolint directives there, so a future cleanup is a single grep.

3. Concurrency test. Add TestExecutePlanConcurrentRemovesCacheCoherence
   which builds N independent Stop→Remove chains in one plan; the
   errgroup fans them out across goroutines that all hit
   containersByService under the mutex. Passes under -race. Failure
   would expose a missing or incorrect lock.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 c1e93bc218 executor: explicit rename data flow + containers-by-service cache
Two related changes to the executor, plus the small cleanups they
attracted in review:

* Rename node consults a planner-set CreateNodeID instead of walking
  ancestors. The old execRenameContainer searched node.DependsOn for a
  CreateContainer result and fell back to a recursive walk through the
  group chain. That worked only by convention; a future op with cross-
  node data needs would have to rediscover or copy the pattern. Now the
  rename op carries an explicit CreateNodeID int set at plan time and
  the executor reads pctx[CreateNodeID].ContainerID directly. The
  recursive findCreatedIDInChain is gone.

* Stop re-listing containers on every create. execCreateContainer used
  to call getContainersByService(ctx, projectName) — a fresh
  ContainerList per create — to resolve service references at execute
  time. The executor now holds a live containersByService view seeded
  from ObservedState (via observed.containersByService()) and grown as
  OpCreateContainer nodes complete, so service references resolve from
  memory. On OpRemoveContainer the removed container is dropped from
  the view via slices.DeleteFunc, so a dependent's create that resolves
  network_mode: service:x against the just-removed container cannot
  pick up a stale ID (Containers.sorted() orders by canonical name and
  would otherwise return the removed container).

* Defensive slices.Clone of op.Service.VolumesFrom in execCreateContainer.
  resolveServiceReferences mutates VolumesFrom in place, and the
  shallow struct copy of *op.Service still shares the backing array.
  Single-execution-per-node makes it safe today, but the clone removes
  the trap for any future parallel-execution mode.

* Operation gains a CreateNodeID int (not a *PlanNode pointer) to avoid
  a structural cycle between Operation and PlanNode. OperationType
  values are pinned to explicit integers so adding an op in the middle
  cannot silently shift the others.

* execRenameContainer carries two checks so a missing CreateNodeID and
  an empty produced ID are distinguishable in logs. Both are programmer
  invariants (prefixed "internal:").

* containersByServiceFromObserved moved from a package-level helper to
  a method on *ObservedState.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 31abe5f46d reconcile: stop duplicating volume divergence prompt
ensureProjectVolumes already prompts the user when a volume's config hash
diverges from the compose file (create.go:1626) and recreates it on confirm.
The reconciler ran after ensureProjectVolumes and prompted again with the
exact same message — so a user who declined the first prompt was asked the
same question a second time.

Drop the prompt + recreate call from reconcileVolumes(). Recreation of
diverged volumes stays owned by ensureProjectVolumes; the reconciler only
plans the creation of missing volumes. If the user declined recreation,
the existing container's mounts still match the existing volume name and
hasVolumeMismatch correctly returns false, so containers are not falsely
flagged as obsolete.

Keep the supporting infrastructure available for future use, when
divergence detection migrates fully into the reconciler:

  - reconciler.prompt field
  - prompt parameter on reconcile()
  - planRecreateVolume function (//nolint:unused)
  - servicesUsingVolume function (//nolint:unused)
  - noPrompt test helper

The reframed test (TestReconcileVolumes_DivergedIsIgnored) asserts the
new contract: a diverged volume produces no plan operations from the
reconciler.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Guillaume LoursandClaude Opus 4.7 f41d5c10a6 reconcile: trivial cleanups
- plan.go: pin OperationType constants to explicit values so adding an op
  in the middle doesn't shift the others.
- executor.go: remove the meaningless `var _ = getContainerProgressName`
  line — same-package functions are always accessible.
- reconcile.go: fix the stale switch-default comment that contradicted
  the case clause above it.
- reconcile.go: drop the local `serviceLabel` const that shadowed
  `api.ServiceLabel` and use the shared constant.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De LoofandClaude Opus 4.6 e4dc9f3db9 Fix code review issues: replace label, observed names for disconnect/remove
- Fix ContainerReplaceLabel detection: use op.Inherited != nil (not
  op.Container) as signal for recreate in execCreateContainer
- Use observed network name (not desired) for DisconnectNetwork and
  RemoveNetwork operations, in case the name changed
- Use observed volume name (not desired) for RemoveVolume operations
- Update reconciliation.md with 3 new lessons learned (7.8, 7.9, 7.10)

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De LoofandClaude Opus 4.6 fbea647b9d Cleanup: remove convergence struct, extract resolveServiceReferences
- Remove the `convergence` struct and `newConvergence` constructor
- Extract `resolveServiceReferences` as a standalone function taking
  `map[string]Containers` instead of a method on convergence
- Add `getContainersByService` helper on composeService
- Update run.go and executor.go to use the new standalone function
- Remove dead code: `getObservedState`, `setObservedState`

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof 65275c056b Swith to reconciliation
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof fd75494c0e Reconciliation: Executor
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof 917119f3e7 Make plan.String() deterministic for usability in tests
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof b68333882d Reconciliation : containers
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof 1af7ced7cd Reconciliation : networks and volumes
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof b016de4b9f introduce (reconcilation) Plan
String() is designed to make it easy to compare coomputed plan vs expectations

Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
Nicolas De Loof 34693bd14d Introduce ObservedState + populate from inspected resources
Signed-off-by: Nicolas De Loof <[email protected]>
2026-06-08 20:14:38 +02:00
caltechustc 5d67ce6dfe refactor: replace Split in loops with more efficient SplitSeq and replace HasPrefix+TrimPrefix with CutPrefix
Signed-off-by: caltechustc <[email protected]>
2026-06-05 15:52:36 +02:00
Nicolas De loofandClaude Opus 4.7 9834762bd7 fix(build): skip remote URL contexts from bake fs.read allowlist
When a service's build context is a remote git/HTTP URL, the path was
unconditionally added to bake's --allow fs.read= entitlements. On Windows,
bake then tries to evaluate the URL as a local filesystem path and fails
because `https:` is invalid path syntax (colon is reserved for drive
letters).

Apply the same gitutil.ParseGitRef + "://" check already used for
additional_contexts so that remote contexts are skipped from the fs.read
allowlist.

Fixes #13815

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Nicolas De loof <[email protected]>
2026-06-05 15:13:36 +02:00
Nicolas De loofandClaude Opus 4.7 d9d9e87882 docs(CLAUDE.md): note that commits must be signed off (DCO)
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Nicolas De loof <[email protected]>
2026-06-05 14:52:55 +02:00
securityeng-bot[bot] f3969cdc7f ci: add Dependabot cooldown 2026-06-03 19:18:53 +02:00
Sebastiaan van Stijn 7eeb7de7a2 docs: compose logs: add links for since/until flag descriptions
Link to the corresponding `docker container logs` equivalents, which
contain more details on the accepted formats and use.

The container logs documentation still needs some updates to provide
per-flag sections, so follow-ups can be made once those are done.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
2026-05-26 14:28:34 +02:00
dependabot[bot] 40a2262a0f build(deps): bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 29.5.1+incompatible to 29.5.2+incompatible.
- [Commits](https://github.com/docker/cli/compare/v29.5.1...v29.5.2)

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

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-21 16:44:46 +02:00
dependabot[bot] 4732a2ed20 build(deps): bump golang.org/x/sys from 0.42.0 to 0.44.0
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.42.0 to 0.44.0.
- [Commits](https://github.com/golang/sys/compare/v0.42.0...v0.44.0)

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

Signed-off-by: dependabot[bot] <[email protected]>
v5.1.4
2026-05-20 16:45:12 +02:00
dependabot[bot] 5fb09a9b85 build(deps): bump github.com/docker/cli
Bumps [github.com/docker/cli](https://github.com/docker/cli) from 29.4.3+incompatible to 29.5.1+incompatible.
- [Commits](https://github.com/docker/cli/compare/v29.4.3...v29.5.1)

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

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-20 16:29:48 +02:00
dependabot[bot] 32c78147ba build(deps): bump github.com/compose-spec/compose-go/v2
Bumps [github.com/compose-spec/compose-go/v2](https://github.com/compose-spec/compose-go) from 2.10.2 to 2.11.0.
- [Release notes](https://github.com/compose-spec/compose-go/releases)
- [Commits](https://github.com/compose-spec/compose-go/compare/v2.10.2...v2.11.0)

---
updated-dependencies:
- dependency-name: github.com/compose-spec/compose-go/v2
  dependency-version: 2.11.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-20 16:16:28 +02:00
Guillaume LoursandClaude Opus 4.7 eb4b1cc3f6 fix(publish): prompt on sensitive-looking env literals
Replace the "flag any literal env var" check with a key-name heuristic
backed by the upstream DefangLabs keyword detector (password, secret,
token, api_key, …), and convert the hard error into a prompt matching
the existing checkForBindMount / checkForSensitiveData UX. --with-env
silences the env prompt; literal config.content gets its own prompt.

The previous check flagged benign vars like LOG_LEVEL=info, blocking
the 99% case, while still missing low-entropy real secrets the
existing secret-detector skips (MYSQL_ROOT_PASSWORD=toto slips through
on entropy ~1.5).

Refs: docker/compose#13394

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Signed-off-by: Guillaume Lours <[email protected]>
2026-05-20 15:48:38 +02:00
dependabot[bot] 0e25711caa build(deps): bump google.golang.org/grpc from 1.81.0 to 1.81.1
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.81.0 to 1.81.1.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.81.0...v1.81.1)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.81.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
2026-05-20 15:45:40 +02:00
Guillaume Lours c59e13cde5 feat: pre-filter Desktop Logs view by Compose project
Pass the active project name as the appId query parameter on the
docker-desktop://dashboard/logs deep link, both from the post-command
hint (compose up -d, compose logs) and the interactive nav menu
('l' key during compose up). The hook subprocess re-runs compose-go's
project loader so the name matches what the parent computed; it skips
the appId when -p, -f, --project-directory, --workdir, or --env-file
is set, since the hook payload does not carry their values. docker
logs stays unfiltered: the CLI hook contract does not expose the
positional container id.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 17:28:03 +02:00
Guillaume Lours 554a2ba3e8 refactor: drop Desktop beta-settings check; gate hint on LogsTab flag
Docker Desktop is removing the "Enable Logs view" beta setting, so drop
the /app/settings check and rely on /features alone. With the setting
gate gone, the compose hook subprocess would print the Logs view hint
regardless of LogsTab; add a flag check in handleHook. Consolidate
engine-label discovery and feature-flag evaluation into internal/desktop.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 17:28:03 +02:00
Guillaume Lours 71cd334dbd fix: restore stoppingEvent/stoppedEvent helpers for plugin stop hook
The stop lifecycle hook added in 672dc14d2 calls stoppingEvent and
stoppedEvent from pkg/compose/plugins.go, but the helpers had been
removed by the earlier wrapper-cleanup in da530c723. The result was a
broken go build for pkg/compose on upstream/main.

Restore the two helpers alongside the symmetric creating/created and
removing/removed pairs so call sites in plugins.go match the existing
pattern used in the same switch.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 15:12:39 +02:00
Guillaume Lours 5b4586e3a6 fix: stop-only metadata no longer drops options for up/down
A previous change extended IsEmpty() to include `Stop == nil`. For a
provider that advertises only a `stop` block, this caused
commandMetadataIsEmpty to be false in setupPluginCommand, which made
the option-forwarding filter reject every key — silently dropping
all provider options on `up` and `down`.

The Stop-presence signal lives independently in stop.go and the
"stop" case of setupPluginCommand, so reverting the IsEmpty check
to its original semantics is sufficient.

Addresses PR #13779 review feedback.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 11:11:38 +02:00
Guillaume Lours 19fc292eb9 perf: avoid duplicate provider metadata fetch on stop
The previous implementation fetched the provider binary path and
metadata twice per service during `compose stop`: once in stop.go
to gate on the `stop` capability, and again inside runPlugin via
setupPluginCommand.

setupPluginCommand now signals "skip" by returning (nil, nil) when
the requested command is absent from the provider's metadata.
stop.go calls runPlugin directly; the skip-when-unadvertised check
moves into runPlugin.

Addresses PR #13779 review feedback.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 11:11:38 +02:00
Guillaume Lours 672dc14d29 feat: add stop lifecycle hook for external providers
Provider-backed services were silently skipped on `docker compose stop`,
leaving external resources running after the user expected the stack to
be paused (e.g. after Ctrl+C during `up --watch`).

Compose now invokes `<provider> compose stop <service>` for providers
that advertise a `stop` block in their `metadata` subcommand output.
Providers that do not advertise stop (or do not implement metadata at
all) are silently skipped, preserving backward compatibility with
existing providers that pre-date this hook.

Closes #13772

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 11:11:38 +02:00
Guillaume Lours 8e0d5e17a7 fix: make e2e tests pass reliably locally with Docker Desktop
- Fix stale image/container reuse across test runs                                                                                                                                                                                                                                                          - Add registry readiness check and async removal polling
  - Skip multi-arch test when docker driver supports it
  - Use t.Cleanup for reliable teardown, fix project name mismatches
  - Re-enable 4 previously skipped tests that now pass

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 10:55:41 +02:00
Guillaume Lours 66c21c3b6c fix: route OCI artifact pulls through Docker Desktop HTTP proxy
The compose process performs OCI artifact fetches in-process via
containerd's docker resolver, whose default transport only honors
HTTP_PROXY/HTTPS_PROXY/NO_PROXY env vars. Users behind PAC-only
corporate proxies hit i/o timeouts on `oci://` includes and on
`compose publish`.

When Docker Desktop is the active engine and exposes httpproxy.sock,
route the resolver through it (PAC-aware). Falls back to the default
transport when DD is unavailable or the socket is missing. Modeled on
docker/mcp-gateway PR #354.

Signed-off-by: Guillaume Lours <[email protected]>
2026-05-18 10:53:23 +02:00
Nicolas De loof 659b269e52 nit: use labelFilter consistently in filters.go
Signed-off-by: Nicolas De loof <[email protected]>
2026-05-12 11:31:40 +02:00
Nicolas De loof 5c70712199 fix: restore deprecated Set.Clear/Union; use resource var in pull.go
Assisted-By: docker-agent
Signed-off-by: Nicolas De loof <[email protected]>
2026-05-12 11:31:40 +02:00