Repository navigation
fix: honor selected Docker context for local API clients - #915
Merged
Merged
Conversation
|
Enclave skipped this draft pull request. It will run automatically when you mark the PR as Ready for review. |
alongubkin
marked this pull request as ready for review
October 6, 2026 22:20
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local Docker API clients used Bollard's local defaults, ignoring the persisted Docker context. With a nondefault Unix socket, API operations could reach a different daemon from Docker CLI operations.
The shared connector now resolves context and host settings for container, sandbox, and bridge clients. Image loading is pinned to the captured API endpoint. Invalid selected configuration and unexpected bridge API failures preserve their source errors. Unix sockets, platform-supported named pipes, and plaintext TCP are supported; TLS and SSH return actionable unsupported errors without downgrading security. Socket contexts ignore TLS verification flags as Docker CLI does, while TCP TLS remains rejected.
Selection matches Docker CLI source and installed behavior:
DOCKER_HOST>DOCKER_CONTEXT> persistedcurrentContext. The syntheticdefaultcontext honorsDOCKER_HOST. Named contexts are inspected through Docker CLI rather than duplicating its metadata/TLS store. Native services using the default endpoint need no Docker CLI executable. No new dependencies are added.Validation:
No application containers or builds are needed for the proof. The Docker registry integration test is explicitly ignored when its external prerequisites are absent and fails strictly when invoked.
References: Docker contexts, CLI context selection, context store layout, Bollard local connection.