Skip to content

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

Merged
thaJeztah merged 1 commit into
docker:masterfrom
vibhuanand:3064-context-use-docs
May 8, 2026
Merged

docs: clarify docker context use affects all terminal sessions#6840
thaJeztah merged 1 commit into
docker:masterfrom
vibhuanand:3064-context-use-docs

Conversation

@vibhuanand
Copy link
Copy Markdown
Contributor

@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

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

554131-istock-157135312-header

@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
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@vvoland vvoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, failure related:

ERROR: no start marker in context_use.md

@vvoland vvoland modified the milestones: 29.4.0, 29.4.1 Apr 3, 2026
@thaJeztah thaJeztah modified the milestones: 29.4.1, 29.4.2 Apr 20, 2026
@vvoland vvoland modified the milestones: 29.4.2, 29.4.3, 29.5.0 May 1, 2026
Signed-off-by: Vibhu <vibhuanand@outlook.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the 3064-context-use-docs branch from d97bd28 to e03b837 Compare May 7, 2026 15:07
Copy link
Copy Markdown
Collaborator

@vvoland vvoland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, failure related:

ERROR: no start marker in context_use.md

@thaJeztah thaJeztah merged commit a6d013f into docker:master May 8, 2026
102 of 105 checks passed
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

4 participants