@@ -18,7 +18,6 @@ import (
18
18
"github.com/docker/docker/api/types/container"
19
19
mounttypes "github.com/docker/docker/api/types/mount"
20
20
networktypes "github.com/docker/docker/api/types/network"
21
- "github.com/docker/docker/api/types/strslice"
22
21
"github.com/docker/go-connections/nat"
23
22
"github.com/pkg/errors"
24
23
"github.com/spf13/pflag"
@@ -400,17 +399,14 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con
400
399
tmpfs [k ] = v
401
400
}
402
401
403
- var (
404
- runCmd strslice.StrSlice
405
- entrypoint strslice.StrSlice
406
- )
402
+ var runCmd , entrypoint []string
407
403
408
404
if len (copts .Args ) > 0 {
409
405
runCmd = copts .Args
410
406
}
411
407
412
408
if copts .entrypoint != "" {
413
- entrypoint = strslice. StrSlice {copts .entrypoint }
409
+ entrypoint = [] string {copts .entrypoint }
414
410
} else if flags .Changed ("entrypoint" ) {
415
411
// if `--entrypoint=` is parsed then Entrypoint is reset
416
412
entrypoint = []string {"" }
@@ -551,9 +547,9 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con
551
547
if haveHealthSettings {
552
548
return nil , errors .Errorf ("--no-healthcheck conflicts with --health-* options" )
553
549
}
554
- healthConfig = & container.HealthConfig {Test : strslice. StrSlice {"NONE" }}
550
+ healthConfig = & container.HealthConfig {Test : [] string {"NONE" }}
555
551
} else if haveHealthSettings {
556
- var probe strslice. StrSlice
552
+ var probe [] string
557
553
if copts .healthCmd != "" {
558
554
probe = []string {"CMD-SHELL" , copts .healthCmd }
559
555
}
@@ -675,8 +671,8 @@ func parse(flags *pflag.FlagSet, copts *containerOptions, serverOS string) (*con
675
671
UTSMode : utsMode ,
676
672
UsernsMode : usernsMode ,
677
673
CgroupnsMode : cgroupnsMode ,
678
- CapAdd : strslice . StrSlice ( copts .capAdd .GetSlice () ),
679
- CapDrop : strslice . StrSlice ( copts .capDrop .GetSlice () ),
674
+ CapAdd : copts .capAdd .GetSlice (),
675
+ CapDrop : copts .capDrop .GetSlice (),
680
676
GroupAdd : copts .groupAdd .GetSlice (),
681
677
RestartPolicy : restartPolicy ,
682
678
SecurityOpt : securityOpts ,
0 commit comments