mirror of
https://github.com/docker/cli.git
synced 2026-08-24 10:05:37 -05:00
- opts.ParseRestartPolicy: use a struct-literal and clarify that this function only parses, but does not validate invalid combinations. - cli/compose/convert: convertRestartPolicy: update doc to be more clear on the order of preference and intent. - cli/compose/convert: convertRestartPolicy: use a switch based on known values to allow the exhaustive linter to catch missing options. - cli/compose/convert: convertRestartPolicy: add validation for negative values when converting the legacy service.restart policy. - cli/compose/convert: convertRestartPolicy: always set MaxAttempts and leave validation to the daemon. opts: ParseRestartPolicy: improve validation of max restart-counts Use the new container.ValidateRestartPolicy utility to verify if a max-restart-count is allowed for the given restart-policy. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>