-
Notifications
You must be signed in to change notification settings - Fork 459
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When stopping or starting Traefik, don't hide important errors. Docker doesn't return an error when starting a started container or stopping a stopped container. When rebooting we want to know about errors during run as we've just stopped and removed the previous container. When booting, we want to leave the running container if it exists, restart a stopped container and run a new one if none exists. We can implement this with `docker start ... || docker run ...`: - if the container is started, `docker start` will exit with 0 - if the container is stopped, `docker start` will start it and exit with 0 - if the container doesn't exist, `docker start` will return a non zero exit code and `docker run` will create a new container. Any errors in `docker run` will be returned.
- Loading branch information
Showing
3 changed files
with
24 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters