mirror of https://github.com/docker/cli.git
Merge pull request #26988 from thaJeztah/remove-service-update-name-flag
Remove service update name flag
This commit is contained in:
commit
881831531a
|
@ -27,6 +27,8 @@ func newCreateCommand(dockerCli *command.DockerCli) *cobra.Command {
|
|||
}
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&opts.mode, flagMode, "replicated", "Service mode (replicated or global)")
|
||||
flags.StringVar(&opts.name, flagName, "", "Service name")
|
||||
|
||||
addServiceFlags(cmd, opts)
|
||||
|
||||
flags.VarP(&opts.labels, flagLabel, "l", "Service labels")
|
||||
|
|
|
@ -511,7 +511,6 @@ func (opts *serviceOptions) ToService() (swarm.ServiceSpec, error) {
|
|||
// Any flags that are not common are added separately in the individual command
|
||||
func addServiceFlags(cmd *cobra.Command, opts *serviceOptions) {
|
||||
flags := cmd.Flags()
|
||||
flags.StringVar(&opts.name, flagName, "", "Service name")
|
||||
|
||||
flags.StringVarP(&opts.workdir, flagWorkdir, "w", "", "Working directory inside the container")
|
||||
flags.StringVarP(&opts.user, flagUser, "u", "", "Username or UID (format: <name|uid>[:<group|gid>])")
|
||||
|
|
|
@ -172,7 +172,6 @@ func updateService(flags *pflag.FlagSet, spec *swarm.ServiceSpec) error {
|
|||
return task.Resources
|
||||
}
|
||||
|
||||
updateString(flagName, &spec.Name)
|
||||
updateLabels(flags, &spec.Labels)
|
||||
updateContainerLabels(flags, &cspec.Labels)
|
||||
updateString("image", &cspec.Image)
|
||||
|
|
Loading…
Reference in New Issue