Skip to content

docs: clarify WORKDIR tilde path behavior#6937

Open
devendrakushwah80 wants to merge 1 commit into
moby:masterfrom
devendrakushwah80:docs/workdir-tilde-note
Open

docs: clarify WORKDIR tilde path behavior#6937
devendrakushwah80 wants to merge 1 commit into
moby:masterfrom
devendrakushwah80:docs/workdir-tilde-note

Conversation

@devendrakushwah80

Copy link
Copy Markdown

Description

Adds a note clarifying that WORKDIR does not perform shell expansion.

Paths beginning with ~ or ~username are treated as literal directory names and are not resolved to a user's home directory.

Related issues

References docker/docs#25512

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR clarifies Dockerfile WORKDIR behavior in BuildKit’s documentation by explicitly noting that WORKDIR does not do shell-style tilde expansion, preventing users from assuming ~/~username resolve to home directories.

Changes:

  • Add a documentation note that WORKDIR does not perform shell expansion.
  • Clarify that ~ and ~username are treated as literal directory names (not home directories).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@devendrakushwah80 devendrakushwah80 force-pushed the docs/workdir-tilde-note branch from 0951e1c to 74d3c62 Compare July 7, 2026 19:02
@devendrakushwah80 devendrakushwah80 marked this pull request as draft July 8, 2026 03:16
@devendrakushwah80 devendrakushwah80 marked this pull request as ready for review July 8, 2026 03:16
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.

3 participants