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 @@ -1341,7 +1341,13 @@ The followings examples are all valid:
13411341### Working directory
13421342
13431343The default working directory for running binaries within a container is the
1344- root directory (` / ` ). It is possible to set a different working directory with the
1345- Dockerfile ` WORKDIR ` command. The operator can override this with:
1344+ root directory (` / ` ). The default working directory of an image is set using
1345+ the Dockerfile ` WORKDIR ` command. You can override the default working
1346+ directory for an image using the ` -w ` (or ` --workdir ` ) flag for the `docker
1347+ run` command:
13461348
1347- -w="", --workdir="": Working directory inside the container
1349+ ``` text
1350+ $ docker run -w /home/$USER -it alpine
1351+ ```
1352+
1353+ 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