Add an option to add and drop capabilities in the Docker driver

This commit is contained in:
Filip Ochnik
2018-01-14 19:56:57 +01:00
parent 53ae2f83d5
commit 7f072ab2da
3 changed files with 70 additions and 0 deletions

View File

@@ -324,6 +324,32 @@ The `docker` driver supports the following configuration in the job spec. Only
}
```
* `cap_add` - (Optional) A list of string flags to pass directly to
[`--cap-add`](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities).
For example:
```hcl
config {
cap_add = [
"SYS_TIME",
]
}
```
* `cap_drop` - (Optional) A list of string flags to pass directly to
[`--cap-drop`](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities).
For example:
```hcl
config {
cap_drop = [
"MKNOD",
]
}
```
### Container Name
Nomad creates a container after pulling an image. Containers are named