Mention Docker 19.03 and its compose file version - and add max_replicas_per_node

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2020-02-12 10:52:47 +10:00 committed by Sebastiaan van Stijn
parent dee187c282
commit d5e7a26efe
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
2 changed files with 24 additions and 0 deletions

View File

@ -2,6 +2,7 @@ This table shows which Compose file versions support specific Docker releases.
| **Compose file format** | **Docker Engine release** |
| ------------------- | ------------------ |
| 3.8 | 19.03.0+ |
| 3.7 | 18.06.0+ |
| 3.6 | 18.02.0+ |
| 3.5 | 17.12.0+ |

View File

@ -796,6 +796,29 @@ services:
replicas: 6
```
#### max_replicas_per_node
If the service is `replicated` (which is the default), [limit the number of replicas](/engine/reference/commandline/service_create.md#specify-maximum-replicas-per-node---replicas-max-per-node)
that can run on an node at any time.
> **[Version 3.8](compose-versioning.md#version-3) and above.**
When there are more tasks requested than running nodes, an error `no suitable node (max replicas per node limit exceed)` is raised.
```yaml
version: "{{ site.compose_file_v3 }}"
services:
worker:
image: dockersamples/examplevotingapp_worker
networks:
- frontend
- backend
deploy:
mode: replicated
replicas: 6
max_replicas_per_node: 1
```
#### resources
Configures resource constraints.