diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-08 14:32:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 14:32:27 +0200 |
commit | 5701fe6689b93e238b8aa6ce6082c2cddc424b9a (patch) | |
tree | 424109047dd573ffae1eb8302031e0b7e23dbb1e /pkg | |
parent | 8776a577bf6b86a4e034c54243c5e4a419d14c35 (diff) | |
parent | 8d44c61f27a3ffcd288895a705adb740ccb02cbd (diff) | |
download | podman-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')
-rw-r--r-- | pkg/spec/createconfig.go | 9 |
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 |