File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1231,7 +1231,13 @@ The followings examples are all valid:
12311231### Working directory
12321232
12331233The default working directory for running binaries within a container is the
1234- root directory (` / ` ). It is possible to set a different working directory with the
1235- Dockerfile ` WORKDIR ` command. The operator can override this with:
1234+ root directory (` / ` ). The default working directory of an image is set using
1235+ the Dockerfile ` WORKDIR ` command. You can override the default working
1236+ directory for an image using the ` -w ` (or ` --workdir ` ) flag for the `docker
1237+ run` command:
12361238
1237- -w="", --workdir="": Working directory inside the container
1239+ ``` text
1240+ $ docker run -w /home/$USER -it alpine
1241+ ```
1242+
1243+ If the directory doesn't already exist in the container, it will be created.
You can’t perform that action at this time.
0 commit comments