mirror of https://github.com/docker/docs.git
fix(yaml): Avoid bool type error
Docs contained an invalid example: ``` ERROR: The Compose file './docker-compose.yml' is invalid because: services.*.restart contains an invalid type, it should be a string ``` Use quotes to avoid YAML's implicit type conversion. Someone may also want to do an audit of [other type conversions that might cause problems](https://www.rpatterson.net/blog/docker-gotchas/#yaml-needs-some-zen).
This commit is contained in:
parent
62d0daa0e3
commit
e0b3941eab
|
@ -1538,16 +1538,16 @@ volumes_from:
|
|||
`no` is the default restart policy, and it doesn't restart a container under any circumstance. When `always` is specified, the container always restarts. The `on-failure` policy restarts a container if the exit code indicates an on-failure error.
|
||||
|
||||
```yaml
|
||||
restart: no
|
||||
restart: "no"
|
||||
```
|
||||
```yaml
|
||||
restart: always
|
||||
restart: "always"
|
||||
```
|
||||
```yaml
|
||||
restart: on-failure
|
||||
restart: "on-failure"
|
||||
```
|
||||
```yaml
|
||||
restart: unless-stopped
|
||||
restart: "unless-stopped"
|
||||
```
|
||||
|
||||
{: id="cpu-and-other-resources"}
|
||||
|
|
Loading…
Reference in New Issue