Skip to content

docs: clarify docker context use affects all terminal sessions#6840

Open
vibhuanand wants to merge 1 commit intodocker:masterfrom
vibhuanand:3064-context-use-docs
Open

docs: clarify docker context use affects all terminal sessions#6840
vibhuanand wants to merge 1 commit intodocker:masterfrom
vibhuanand:3064-context-use-docs

Conversation

@vibhuanand
Copy link

@vibhuanand vibhuanand commented Mar 4, 2026

Fixes #3064

- What I did
Clarified the behavior of docker context use in the CLI documentation.
The docs now explicitly mention that this command updates the Docker CLI configuration and therefore changes the default context globally (affecting all terminal sessions).

Added examples showing how to temporarily select a context using:

  • the DOCKER_CONTEXT environment variable
  • the --context flag for individual commands

- How I did it

Updated the documentation file:

docs/reference/commandline/context_use.md

Added explanation that docker context use modifies the CLI config and is therefore "sticky". Also added examples demonstrating safer alternatives for temporary context selection.

- How to verify it

  1. Open the updated documentation page:
    docs/reference/commandline/context_use.md

  2. Confirm the description explains that:

    • docker context use modifies the CLI config
    • the change affects all terminal sessions
  3. Confirm examples exist for:

    • docker --context <context>
    • export DOCKER_CONTEXT=<context>

- Human readable description for the release notes

docs: clarify that `docker context use` updates the CLI config and affects all terminal sessions; add examples using `DOCKER_CONTEXT` and `--context`

- A picture of a cute animal (not mandatory but encouraged)

554131-istock-157135312-header

Signed-off-by: Vibhu <vibhuanand@outlook.com>
@vibhuanand vibhuanand requested review from a team and thaJeztah as code owners March 4, 2026 22:47
@vibhuanand vibhuanand changed the title docs: clarify docker context use is sticky docs: clarify docker context use affects all terminal sessions Mar 4, 2026
@thaJeztah thaJeztah added this to the 29.3.1 milestone Mar 5, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docker context use shared between terminal sessions

3 participants