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 @@ -1232,7 +1232,13 @@ The followings examples are all valid:
12321232### Working directory
12331233
12341234The default working directory for running binaries within a container is the
1235- root directory (` / ` ). It is possible to set a different working directory with the
1236- Dockerfile ` WORKDIR ` command. The operator can override this with:
1235+ root directory (` / ` ). The default working directory of an image is set using
1236+ the Dockerfile ` WORKDIR ` command. You can override the default working
1237+ directory for an image using the ` -w ` (or ` --workdir ` ) flag for the `docker
1238+ run` command:
12371239
1238- -w="", --workdir="": Working directory inside the container
1240+ ``` text
1241+ $ docker run -w /home/$USER -it alpine
1242+ ```
1243+
1244+ 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