Last Updated on November 16, 2024 by sandeeppote
To setup restart policy to the container, use following command-
docker run --restart=<<policy option>> <<container>>
Following are the options for the container restart-
- no (default)
- on-failure
- always
- unless-specified
Following is the matrix for the restart policies-
* – this will start when the Docker daemon is started
Above is applicable if the container starts successfully
Live Restore
If you want to keep container running if the Docker daemon crashes or stops use the live restore option. This reeduces the container downtime due to daemon crashes or planned outages or upgrades.
Update the /etc/docker/daemon.json in Ubuntu system and add option live-restore:true
0 Comments
1 Pingback