mirror of https://github.com/docker/docs.git
Update docker-compose index.md (#3090)
There were a number of things wrong with the `restart` definition 1. The volumes note came after the restart section rather than before 2. The restart command used array notation rather than map. This is confusing to those unfamiliar with yaml and inconsistent with the rest of the documentation 3. Using `docker-compose` myself, saying `restart: no` does not work, but `restart: "no"` does. ``` ERROR: The Compose file './docker-compose.override.yml' is invalid because: services.letsencrypt.restart contains an invalid type, it should be a string ```
This commit is contained in:
parent
3e137458e8
commit
3de6ebc21e
|
@ -1193,9 +1193,9 @@ See [Docker Volumes](/engine/userguide/dockervolumes.md) and
|
|||
|
||||
`no` is the default restart policy, and it will not 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.
|
||||
|
||||
- restart: no
|
||||
- restart: always
|
||||
- restart: on-failure
|
||||
restart: "no"
|
||||
restart: always
|
||||
restart: on-failure
|
||||
|
||||
### domainname, hostname, ipc, mac\_address, privileged, read\_only, shm\_size, stdin\_open, tty, user, working\_dir
|
||||
|
||||
|
|
Loading…
Reference in New Issue