mirror of https://github.com/docker/cli.git
Merge pull request #28306 from ehazlett/service-create-no-secrets
only check secrets for service create if requested
This commit is contained in:
commit
827b121154
|
@ -62,12 +62,16 @@ func runCreate(dockerCli *command.DockerCli, opts *serviceOptions) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse and validate secrets
|
specifiedSecrets := opts.secrets.Value()
|
||||||
secrets, err := parseSecrets(apiClient, opts.secrets.Value())
|
if len(specifiedSecrets) > 0 {
|
||||||
if err != nil {
|
// parse and validate secrets
|
||||||
return err
|
secrets, err := parseSecrets(apiClient, specifiedSecrets)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
service.TaskTemplate.ContainerSpec.Secrets = secrets
|
||||||
|
|
||||||
}
|
}
|
||||||
service.TaskTemplate.ContainerSpec.Secrets = secrets
|
|
||||||
|
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue