-
Notifications
You must be signed in to change notification settings - Fork 2
/
57. Automatic Container Restarts
25 lines (22 loc) · 1.56 KB
/
57. Automatic Container Restarts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Status Codes
_____________________________________________________
| | |
| 0 | We exited and everything is OK |
|____________|________________________________________|
| | |
| 1,2,3, etc | We exited because something went wrong |
|____________|________________________________________|
Restart Policies
_______________________________________________________________________________________
| | |
| "no" | Never attempt to restart this container if it stops or crashes |
|________________|______________________________________________________________________|
| | |
| always | If this container stops for any reason, always attempt to restart it |
|________________|______________________________________________________________________|
| | |
| on-failure | Only restart if the container stops with an error code |
|________________|______________________________________________________________________|
| | |
| unless-stopped | Always restart unless we (the developers) forcibly stop it |
|________________|______________________________________________________________________|