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 <raigovind93@gmail.com>
  • Loading branch information
govindrai committed Jun 16, 2021
1 parent e3ade90 commit e12aade
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/reference/builder.md
Expand Up @@ -1822,6 +1822,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 e12aade

Please sign in to comment.