Added devices configuration option

Signed-off-by: Dan Elbert <dan.elbert@gmail.com>
This commit is contained in:
delbert@umn.edu 2015-05-08 18:14:32 -05:00 committed by dan.elbert@gmail.com
commit df87bd91c8
6 changed files with 85 additions and 38 deletions

View file

@ -342,8 +342,8 @@ environment:
- BAZ=local
```
Finally, for `volumes`, Compose "merges" entries together with locally-defined
bindings taking precedence:
Finally, for `volumes` and `devices`, Compose "merges" entries together with
locally-defined bindings taking precedence:
```yaml
# original service
@ -361,4 +361,4 @@ volumes:
- /original-dir/foo:/foo
- /local-dir/bar:/bar
- /local-dir/baz/:baz
```
```

View file

@ -29,8 +29,8 @@ image: a4bc65fd
### build
Path to a directory containing a Dockerfile. When the value supplied is a
relative path, it is interpreted as relative to the location of the yml file
Path to a directory containing a Dockerfile. When the value supplied is a
relative path, it is interpreted as relative to the location of the yml file
itself. This directory is also the build context that is sent to the Docker daemon.
Compose will build and tag it with a generated name, and use that image thereafter.
@ -342,6 +342,16 @@ dns_search:
- dc2.example.com
```
### devices
List of device mappings. Uses the same format as the `--device` docker
client create option.
```
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
```
### working\_dir, entrypoint, user, hostname, domainname, mem\_limit, privileged, restart, stdin\_open, tty, cpu\_shares, cpuset, read\_only
Each of these is a single value, analogous to its