Skip to content

feat: support x-context extension to set Docker context in compose.yaml#13694

Open
ssam18 wants to merge 1 commit intodocker:mainfrom
ssam18:feat/x-context-compose-yaml
Open

feat: support x-context extension to set Docker context in compose.yaml#13694
ssam18 wants to merge 1 commit intodocker:mainfrom
ssam18:feat/x-context-compose-yaml

Conversation

@ssam18
Copy link
Copy Markdown
Contributor

@ssam18 ssam18 commented Apr 1, 2026

This adds support for an x-context top-level extension in compose.yaml that lets users pin a named Docker context for all compose operations. It removes the need to pass --context on every invocation when working with non-default contexts like rootless or remote SSH endpoints. The implementation detects the extension after loading the project and reinitializes the Docker CLI for the specified context before dispatching to the backend.

@ssam18 ssam18 requested a review from a team as a code owner April 1, 2026 01:22
@ssam18 ssam18 requested review from glours and ndeloof April 1, 2026 01:22
Allow users to specify a Docker context at the compose project level via an x-context extension field. When set, all compose operations use the
specified context instead of the CLI default, without needing --context on every invocation. Fix for the bug docker#13501

Signed-off-by: Samaresh Kumar Singh <ssam3003@gmail.com>
@ssam18 ssam18 force-pushed the feat/x-context-compose-yaml branch from c86db7d to 774cd20 Compare April 1, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant