fix issue not expose restart policy to upper layer later
@@ -32,7 +32,7 @@ import (
const (
minMemory = units.MiB * 4
maxMemory = math.MaxInt64
- restartAlways = "always"
+ // restartAlways = "always"
root = "root"
)
@@ -55,10 +55,10 @@ func (e *Engine) VirtualizationCreate(ctx context.Context, opts *enginetypes.Vir
opts.LogType = "json-file"
}
// set restart always
- restartRetryCount := 3
- if opts.RestartPolicy == restartAlways {
- restartRetryCount = 0
- }
+ // restartRetryCount := 3
+ // if opts.RestartPolicy == restartAlways {
+ // restartRetryCount = 0
+ // }
// no longer use opts.Network as networkmode
// always get network name from networks
// -----------------------------------------
@@ -166,7 +166,7 @@ func (e *Engine) VirtualizationCreate(ctx context.Context, opts *enginetypes.Vir
NetworkMode: networkMode,
RestartPolicy: dockercontainer.RestartPolicy{
Name: opts.RestartPolicy,
- MaximumRetryCount: restartRetryCount,
+ // MaximumRetryCount: restartRetryCount,
},
CapAdd: capAdds,
ExtraHosts: opts.Hosts,
