Skip to content

fix(runtime): honor shell-selected Docker contexts - #1612

Open
samirhvbr wants to merge 1 commit into
usestrix:mainfrom
samirhvbr:fix/docker-context-override
Open

samirhvbr wants to merge 1 commit into
usestrix:mainfrom
samirhvbr:fix/docker-context-override

Conversation

@samirhvbr

Copy link
Copy Markdown

When DOCKER_HOST is unset, a shell-selected DOCKER_CONTEXT is ignored and Strix connects to the saved current context instead. This can start a scan against a different Docker daemon or report a connection failure despite the selected environment working.

Consult DOCKER_CONTEXT before the saved context, preserving explicit-host precedence and existing TLS handling. An explicit default selects the default connection; an unknown context fails instead of silently falling back. Document the selection order.

Closes #1610.

Validation on macOS/Apple Silicon, Python 3.12.14, against current upstream 98e3df14:

  • Three regressions fail before the change: named shell context, explicit default, and missing context. Tests read real temporary Docker context metadata.
  • All 16 connection tests and 64 tests in the broader runtime selection pass after the change.
  • Repository-wide Ruff format/lint, Mypy and Bandit pass; git diff --check passes.
  • make check-all stops at 940 Pyright errors, matching the unchanged upstream baseline.

Endpoint selection was compared with Docker CLI 29.7.2. No Docker sandbox, live daemon connection, LLM requests or target scans were exercised.

@mintlify

mintlify Bot commented Oct 28, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 9a73ba0.

Approve preview

@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Strix now checks DOCKER_CONTEXT before the saved Docker context when DOCKER_HOST is unset.

  • Strix uses a shell-selected Docker context when no host is set.

Reviews (1) · Last reviewed commit: "fix(runtime): honor shell-selected Docke..." · Reviewed by Greptile

This branch has not been deployed

No deployments
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.

[BUG] Docker context selection ignores DOCKER_CONTEXT

1 participant