mirror of https://github.com/docker/cli.git
Update WORKDIR command information
Signed-off-by: Govind Rai <raigovind93@gmail.com>
This commit is contained in:
parent
e3ade90f5b
commit
e12aade595
|
@ -1822,6 +1822,11 @@ RUN pwd
|
||||||
The output of the final `pwd` command in this `Dockerfile` would be
|
The output of the final `pwd` command in this `Dockerfile` would be
|
||||||
`/path/$DIRNAME`
|
`/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
|
## ARG
|
||||||
|
|
||||||
```dockerfile
|
```dockerfile
|
||||||
|
|
Loading…
Reference in New Issue