Merge pull request #1797 from hashicorp/b-fix-docker-volume-docs

Fix docker docs; add volumes/logging to changelog
This commit is contained in:
Michael Schurter 2016-10-10 09:50:59 -07:00 committed by GitHub
commit f0f8fd9328
2 changed files with 32 additions and 4 deletions

View File

@ -8,6 +8,8 @@ IMPROVEMENTS:
* client: Enforce shared allocation directory disk usage [GH-1580]
* client: Introduce a `secrets/` directory to tasks where sensitive data can
be written [GH-1681]
* driver/docker: Support Docker volumes [GH-1767]
* driver/docker: Allow Docker logging to be configured [GH-1767]
BUG FIXES:
* client: Prevent race when persisting state file [GH-1682]

View File

@ -39,7 +39,7 @@ The `docker` driver supports the following configuration in the job spec:
config {
image = "https://hub.docker.internal/redis:3.2"
}
````
```
* `load` - (Optional) A list of paths to image archive files. If
this key is not specified, Nomad assumes the `image` is hosted on a repository
@ -47,6 +47,16 @@ The `docker` driver supports the following configuration in the job spec:
download each of the archive files. The equivalent of `docker load -i path`
would be run on each of the archive files.
```hcl
artifact {
source = "http://path.to/redis.tar"
}
config {
load = ["redis.tar"]
image = "redis"
}
```
* `command` - (Optional) The command to run when starting the container.
```hcl
@ -137,13 +147,29 @@ The `docker` driver supports the following configuration in the job spec:
* `shm_size` - (Optional) The size (bytes) of /dev/shm for the container.
* `logging` - (Optional) A key/value map of Docker logging options. The default
value is `syslog`.
```hcl
config {
logging {
type = "fluentd"
config {
fluentd-address = "localhost:24224"
}
}
}
```
* `volumes` - (Optional) A list of `host_path:container_path` strings to bind
host paths to container paths. Can only be run on clients with the
`docker.volumes.enabled` option set to true.
* `volumes_from` - (Optional) A list of volumes to inherit from another
container. Can only be run on clients with the `docker.volumes.enabled`
option set to true.
```hcl
config {
volumes = ["/path/on/host:/path/in/container"]
}
```
* `work_dir` - (Optional) The working directory inside the container.