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:
Ross Patterson 2021-08-18 12:46:23 -07:00 committed by GitHub
parent 62d0daa0e3
commit e0b3941eab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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"}