vendor: github.com/docker/docker a65c948e7edf (v25.0.0-dev)

full diff: 4b19b2f4ba...a65c948e7e

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2023-08-28 12:06:35 +02:00
parent 79f24c7afb
commit d40fc1a0fa
37 changed files with 403 additions and 159 deletions

View File

@ -185,7 +185,7 @@ func addFlags(flags *pflag.FlagSet) *containerOptions {
flags.VarP(&copts.labels, "label", "l", "Set meta data on a container")
flags.Var(&copts.labelsFile, "label-file", "Read in a line delimited file of labels")
flags.BoolVar(&copts.readonlyRootfs, "read-only", false, "Mount the container's root filesystem as read only")
flags.StringVar(&copts.restartPolicy, "restart", "no", "Restart policy to apply when a container exits")
flags.StringVar(&copts.restartPolicy, "restart", string(container.RestartPolicyDisabled), "Restart policy to apply when a container exits")
flags.StringVar(&copts.stopSignal, "stop-signal", "", "Signal to stop the container")
flags.IntVar(&copts.stopTimeout, "stop-timeout", 0, "Timeout (in seconds) to stop a container")
flags.SetAnnotation("stop-timeout", "version", []string{"1.25"})

View File

@ -711,7 +711,7 @@ func TestParseRestartPolicy(t *testing.T) {
{
input: "no",
expected: container.RestartPolicy{
Name: "no",
Name: container.RestartPolicyDisabled,
},
},
{
@ -721,13 +721,13 @@ func TestParseRestartPolicy(t *testing.T) {
{
input: "always",
expected: container.RestartPolicy{
Name: "always",
Name: container.RestartPolicyAlways,
},
},
{
input: "always:1",
expected: container.RestartPolicy{
Name: "always",
Name: container.RestartPolicyAlways,
MaximumRetryCount: 1,
},
},
@ -738,7 +738,7 @@ func TestParseRestartPolicy(t *testing.T) {
{
input: "on-failure:1",
expected: container.RestartPolicy{
Name: "on-failure",
Name: container.RestartPolicyOnFailure,
MaximumRetryCount: 1,
},
},
@ -749,7 +749,7 @@ func TestParseRestartPolicy(t *testing.T) {
{
input: "unless-stopped",
expected: container.RestartPolicy{
Name: "unless-stopped",
Name: container.RestartPolicyUnlessStopped,
},
},
{