mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
Remap restart policies for command run
This adds 'no' and 'always' as options. Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
This commit is contained in:
parent
c1ee51f31e
commit
7aee922b35
5 changed files with 37 additions and 15 deletions
|
|
@ -24,16 +24,21 @@ import (
|
|||
)
|
||||
|
||||
const (
|
||||
// RestartPolicyAny Always restarts
|
||||
RestartPolicyAny = "any"
|
||||
// RestartPolicyNone Never restarts
|
||||
RestartPolicyNone = "none"
|
||||
// RestartPolicyAny Always restarts
|
||||
RestartPolicyAny = "any"
|
||||
// RestartPolicyOnFailure Restarts only on failure
|
||||
RestartPolicyOnFailure = "on-failure"
|
||||
|
||||
// RestartPolicyRunNo Always restarts
|
||||
RestartPolicyRunNo = "no"
|
||||
// RestartPolicyRunAlways Always restarts
|
||||
RestartPolicyRunAlways = "always"
|
||||
)
|
||||
|
||||
// RestartPolicyList all available restart policy values
|
||||
var RestartPolicyList = []string{RestartPolicyNone, RestartPolicyAny, RestartPolicyOnFailure}
|
||||
var RestartPolicyList = []string{RestartPolicyRunNo, RestartPolicyRunAlways, RestartPolicyOnFailure}
|
||||
|
||||
// Container represents a created container
|
||||
type Container struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue