mirror of
https://github.com/moby/buildkit.git
synced 2026-08-09 17:18:11 +00:00
Merge pull request #6937 from devendrakushwah80/docs/workdir-tilde-note
docs: clarify WORKDIR tilde path behavior
This commit is contained in:
@@ -28,6 +28,12 @@ image built externally is prone to breaking, since working directory may change
|
||||
upstream without warning, resulting in a completely different directory
|
||||
hierarchy for your build.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> `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.
|
||||
|
||||
## Examples
|
||||
|
||||
❌ Bad: this assumes that `WORKDIR` in the base image is `/`
|
||||
|
||||
@@ -20,6 +20,12 @@ image built externally is prone to breaking, since working directory may change
|
||||
upstream without warning, resulting in a completely different directory
|
||||
hierarchy for your build.
|
||||
|
||||
> [!NOTE]
|
||||
>
|
||||
> `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.
|
||||
|
||||
## Examples
|
||||
|
||||
❌ Bad: this assumes that `WORKDIR` in the base image is `/`
|
||||
|
||||
Reference in New Issue
Block a user