mirror of https://github.com/docker/docs.git
compose spec consistency (#20915)
* compose spec consistency * fix links * Update content/reference/compose-file/build.md Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --------- Co-authored-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
This commit is contained in:
parent
0d3955459e
commit
4021d76e8b
|
@ -508,7 +508,12 @@ build:
|
|||
```
|
||||
|
||||
The image builder can then rely on this to mount the SSH key during build.
|
||||
For more information, see the [`RUN --mount=type=ssh` Dockerfile reference](/reference/dockerfile.md#run---mounttypessh).
|
||||
|
||||
For illustration, [SSH mounts](https://github.com/moby/buildkit/blob/master/frontend/dockerfile/docs/reference.md#run---mounttypessh) can be used to mount the SSH key set by ID and access a secured resource:
|
||||
|
||||
```console
|
||||
RUN --mount=type=ssh,id=myproject git clone ...
|
||||
```
|
||||
|
||||
### shm_size
|
||||
|
||||
|
|
|
@ -66,8 +66,7 @@ services:
|
|||
|
||||
#### constraints
|
||||
|
||||
`constraints` defines a required property the platform's node must fulfill to run the service container. It can be set either
|
||||
by a list or a map with string values.
|
||||
`constraints` defines a required property the platform's node must fulfill to run the service container. For a further example, see the [CLI reference docs](/reference/cli/docker/service/create.md#constraint).
|
||||
|
||||
```yml
|
||||
deploy:
|
||||
|
@ -76,30 +75,16 @@ deploy:
|
|||
- disktype=ssd
|
||||
```
|
||||
|
||||
```yml
|
||||
deploy:
|
||||
placement:
|
||||
constraints:
|
||||
disktype: ssd
|
||||
```
|
||||
|
||||
#### preferences
|
||||
|
||||
`preferences` defines a property the platform's node should fulfill to run service container. It can be set either
|
||||
by a list or a map with string values.
|
||||
`preferences` defines a strategy (currently `spread` is the only supported strategy) to spread tasks evenly
|
||||
over the values of the datacenter node label. For a further example, see the [CLI reference docs](/reference/cli/docker/service/create.md#placement-pref)
|
||||
|
||||
```yml
|
||||
deploy:
|
||||
placement:
|
||||
preferences:
|
||||
- datacenter=us-east
|
||||
```
|
||||
|
||||
```yml
|
||||
deploy:
|
||||
placement:
|
||||
preferences:
|
||||
datacenter: us-east
|
||||
- spread: node.labels.zone
|
||||
```
|
||||
|
||||
### replicas
|
||||
|
|
Loading…
Reference in New Issue