diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-08-10 16:29:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-10 16:29:48 -0400 |
commit | 75d2fe63db370d2143bc23519b1026410d6d81f4 (patch) | |
tree | f25d7ddee2af14308eba099064d66ee013266427 /pkg | |
parent | f24538b85e9c81be3cb1f4990bd3613986621746 (diff) | |
parent | 39c493b3fcc8c1c5203e4511d7ff3250d11de285 (diff) | |
download | podman-75d2fe63db370d2143bc23519b1026410d6d81f4.tar.gz podman-75d2fe63db370d2143bc23519b1026410d6d81f4.tar.bz2 podman-75d2fe63db370d2143bc23519b1026410d6d81f4.zip |
Merge pull request #7256 from mheon/fix_cmd_with_entrypoint
Do not use image CMD if user gave ENTRYPOINT
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/specgen/generate/oci.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index 78cd32253..ee9f63680 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -96,8 +96,10 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image finalCommand = append(finalCommand, entrypoint...) + // Only use image command if the user did not manually set an + // entrypoint. command := s.Command - if command == nil && img != nil { + if command == nil && img != nil && s.Entrypoint == nil { newCmd, err := img.Cmd(ctx) if err != nil { return nil, err |