Skip to content

Commit 179a101

Browse files
Merge pull request #21 from Roblox/flags
Add supported options to README.md.
2 parents 08f4ac0 + d42bf58 commit 179a101

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,40 @@ will launch the job.<br/>
5959
**NOTE:** You need to run `setup.sh` before trying out the example jobs.<br/>
6060
More detailed instructions are in the [`example README.md`](https://github.com/Roblox/nomad-driver-containerd/tree/master/example)
6161

62+
## Supported options
63+
64+
| Option | Type | Required | Description |
65+
| :---: | :---: | :---: | :--- |
66+
| **image** | string | yes | OCI image (docker is also OCI compatible) for your container. |
67+
| **command** | string | no | Command to override command defined in the image. |
68+
| **args** | []string | no | Arguments to the command. |
69+
| **privileged** | bool | no | Run container in privileged mode. Your container will have all linux capabilities when running in privileged mode. |
70+
| **readonly_rootfs** | bool | no | Container root filesystem will be read-only. |
71+
| **cap_add** | []string | no | Add individual capabilities. |
72+
| **cap_drop** | []string | no | Drop invidual capabilities. |
73+
| **devices** | []string | no | A list of devices to be exposed to the container. |
74+
| **mounts** | []block | no | A list of mounts to be mounted in the container. Volume, bind and tmpfs type mounts are supported. fstab style [`mount options`](https://github.com/containerd/containerd/blob/master/mount/mount_linux.go#L187-L211) are supported. |
75+
76+
**Mount block**<br/>
77+
&emsp;&emsp;\{<br/>
78+
&emsp;&emsp;&emsp;- **type** (string) (Optional): Supported values are `volume`, `bind` or `tmpfs`. **Default:** volume.<br/>
79+
&emsp;&emsp;&emsp;- **target** (string) (Required): Target path in the container.<br/>
80+
&emsp;&emsp;&emsp;- **source** (string) (Optional): Source path on the host.<br/>
81+
&emsp;&emsp;&emsp;- **options** ([]string) (Optional): fstab style [`mount options`](https://github.com/containerd/containerd/blob/master/mount/mount_linux.go#L187-L211). **NOTE**: For bind mounts, atleast `rbind` and `ro` are required.<br/>
82+
&emsp;&emsp;\}
83+
84+
**Bind mount example**
85+
```
86+
mounts = [
87+
{
88+
type = "bind"
89+
target = "/target/t1"
90+
source = "/src/s1"
91+
options = ["rbind", "ro"]
92+
}
93+
]
94+
```
95+
6296
## Tests
6397
```
6498
$ make test

0 commit comments

Comments
 (0)