Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: refactor cli run reference #4615

Merged
merged 24 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2f48f41
docs: improve introduction to docker run
dvdksn Oct 20, 2023
fad227d
docs: move info about fg/bg flags to run reference
dvdksn Oct 20, 2023
03dc883
docs: improve docs on container identification
dvdksn Nov 8, 2023
d66fe78
docs: move --pid to docker run reference
dvdksn Nov 22, 2023
ff62bf4
docs: move --uts to docker run reference
dvdksn Nov 22, 2023
5dd6e9a
docs: move --ipc to docker run reference
dvdksn Nov 22, 2023
7362097
docs: simplify container networking intro
dvdksn Nov 22, 2023
dbffa0d
docs: move --restart to docker run reference
dvdksn Nov 23, 2023
32189ca
docs: improve description about container exit codes
dvdksn Nov 23, 2023
f984444
docs: move --rm to docker run reference
dvdksn Nov 23, 2023
92c664b
docs: move info about --security-opt to docker run reference
dvdksn Nov 23, 2023
9e75a4c
docs: move --init to docker run reference
dvdksn Nov 23, 2023
72df196
docs: move --cgroup-parent to docker run reference
dvdksn Nov 23, 2023
4a6cde8
docs: move --log-driver to docker run reference
dvdksn Nov 23, 2023
c695ad9
docs: rewrite section on overriding image defaults
dvdksn Nov 23, 2023
b01e287
docs: rewrite section on default entrypoint
dvdksn Nov 27, 2023
3eeac20
docs: rewrite section on exposing ports
dvdksn Nov 27, 2023
7585d66
docs: rewrite section on overriding environment variables
dvdksn Nov 27, 2023
5ede4c8
docs: minor improvements to the healthcheck section
dvdksn Nov 27, 2023
52716c8
docs: move --tmpfs to docker run reference
dvdksn Nov 27, 2023
259aa90
docs: rewrite section on filesystem mounts
dvdksn Nov 27, 2023
4a84514
docs: rewrite section on setting user id
dvdksn Nov 27, 2023
2e394eb
docs: rewrite section on working directory
dvdksn Nov 28, 2023
f8dd8f0
docs: refresh --publish, add --publish-all
dvdksn Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,14 @@ The followings examples are all valid:
### Working directory

The default working directory for running binaries within a container is the
root directory (`/`). It is possible to set a different working directory with the
Dockerfile `WORKDIR` command. The operator can override this with:
root directory (`/`). The default working directory of an image is set using
the Dockerfile `WORKDIR` command. You can override the default working
directory for an image using the `-w` (or `--workdir`) flag for the `docker
run` command:

-w="", --workdir="": Working directory inside the container
```text
$ docker run --rm -w /my/workdir alpine pwd
/my/workdir
```

If the directory doesn't already exist in the container, it will be created.
dvdksn marked this conversation as resolved.
Show resolved Hide resolved
Loading