Skip to content

Commit

Permalink
Update WORKDIR command information
Browse files Browse the repository at this point in the history
Signed-off-by: Govind Rai <[email protected]>
(cherry picked from commit e12aade)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
govindrai authored and thaJeztah committed Feb 18, 2022
1 parent c0e952c commit 62d27c3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/builder.md
Original file line number Diff line number Diff line change
Expand Up @@ -1824,6 +1824,11 @@ RUN pwd
The output of the final `pwd` command in this `Dockerfile` would be
`/path/$DIRNAME`

If not specified, the default working directory is `/`. In practice, if you aren't building a Dockerfile from scratch (`FROM scratch`),
the `WORKDIR` may likely be set by the base image you're using.

Therefore, to avoid unintended operations in unknown directories, it is best practice to set your `WORKDIR` explicitly.

## ARG

```dockerfile
Expand Down

0 comments on commit 62d27c3

Please sign in to comment.