summaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-08-08 14:32:27 +0200
committerGitHub <noreply@github.com>2019-08-08 14:32:27 +0200
commit5701fe6689b93e238b8aa6ce6082c2cddc424b9a (patch)
tree424109047dd573ffae1eb8302031e0b7e23dbb1e /pkg/spec
parent8776a577bf6b86a4e034c54243c5e4a419d14c35 (diff)
parent8d44c61f27a3ffcd288895a705adb740ccb02cbd (diff)
downloadpodman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.tar.gz
podman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.tar.bz2
podman-5701fe6689b93e238b8aa6ce6082c2cddc424b9a.zip
Merge pull request #3744 from mheon/fix_command
When populating CMD, do not include Entrypoint
Diffstat (limited to 'pkg/spec')
-rw-r--r--pkg/spec/createconfig.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/spec/createconfig.go b/pkg/spec/createconfig.go
index f21ae2831..3f70e5935 100644
--- a/pkg/spec/createconfig.go
+++ b/pkg/spec/createconfig.go
@@ -64,8 +64,9 @@ type CreateConfig struct {
CidFile string
ConmonPidFile string
Cgroupns string
- CgroupParent string // cgroup-parent
- Command []string
+ CgroupParent string // cgroup-parent
+ Command []string // Full command that will be used
+ UserCommand []string // User-entered command (or image CMD)
Detach bool // detach
Devices []string // device
DNSOpt []string //dns-opt
@@ -230,8 +231,8 @@ func (c *CreateConfig) getContainerCreateOptions(runtime *libpod.Runtime, pod *l
options = append(options, libpod.WithNamedVolumes(namedVolumes))
}
- if len(c.Command) != 0 {
- options = append(options, libpod.WithCommand(c.Command))
+ if len(c.UserCommand) != 0 {
+ options = append(options, libpod.WithCommand(c.UserCommand))
}
// Add entrypoint unconditionally