Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 532ea20

Browse files
committed
docs: document optional "CAP_" prefix for capabilities
Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 4e58c29513bd0e37b1a58c980593cddb5ab69c5d) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 3d74f7ab489eeb6cfb28d3520d0046b7371c705b Component: cli
1 parent a240747 commit 532ea20

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

  • components/cli/docs/reference

components/cli/docs/reference/run.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,13 +1332,21 @@ The next table shows the capabilities which are not granted by default and may b
13321332
13331333
Further reference information is available on the [capabilities(7) - Linux man page](http://man7.org/linux/man-pages/man7/capabilities.7.html)
13341334
1335-
Both flags support the value `ALL`, so if the
1336-
operator wants to have all capabilities but `MKNOD` they could use:
1335+
Both flags support the value `ALL`, so to allow a container to use all capabilities
1336+
except for `MKNOD`:
13371337
13381338
```bash
13391339
$ docker run --cap-add=ALL --cap-drop=MKNOD ...
13401340
```
13411341
1342+
The `--cap-add` and `--cap-drop` flags accept capabilities to be specified with
1343+
a `CAP_` prefix. The following examples are therefore equivalent:
1344+
1345+
```bash
1346+
$ docker run --cap-add=SYS_ADMIN ...
1347+
$ docker run --cap-add=CAP_SYS_ADMIN ...
1348+
```
1349+
13421350
For interacting with the network stack, instead of using `--privileged` they
13431351
should use `--cap-add=NET_ADMIN` to modify the network interfaces.
13441352

0 commit comments

Comments
 (0)