From cb453e7b3efa7121b11e1c559d7e69d7d9efe5f3 Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Tue, 27 Nov 2018 07:19:40 -0500 Subject: [PATCH] document bind and tmpfs options --- website/source/docs/drivers/docker.html.md | 23 +++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/website/source/docs/drivers/docker.html.md b/website/source/docs/drivers/docker.html.md index 55b3a4b0e93a..b1d743fbd39e 100644 --- a/website/source/docs/drivers/docker.html.md +++ b/website/source/docs/drivers/docker.html.md @@ -293,12 +293,14 @@ The `docker` driver supports the following configuration in the job spec. Only * `mounts` - (Optional) A list of [mounts](https://docs.docker.com/engine/reference/commandline/service_create/#add-bind-mounts-or-volumes) - to be mounted into the container. Only volume type mounts are supported. + to be mounted into the container. Volume, bind, and tmpfs type mounts are supported. ```hcl config { mounts = [ + # sample volume mount { + type = "volume" target = "/path/in/container" source = "name-of-volume" readonly = false @@ -314,6 +316,25 @@ The `docker` driver supports the following configuration in the job spec. Only } } } + }, + # sample bind mount + { + type = "bind" + target = "/path/in/container" + source = "/path/in/host" + readonly = false + bind_options { + propagation = "xxxx" + } + }, + # sample tmpfs mount + { + type = "tmpfs" + target = "/path/in/container" + readonly = false + tmpfs_options { + size = 100000 # size in bytes + } } ] }