summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-07-14 13:05:25 -0400
committerMatthew Heon <matthew.heon@pm.me>2020-07-22 14:53:26 -0400
commit4d7626cc897d821bd8c931d1dde1fa0ab236f4f9 (patch)
tree721a9aa16790e706b993b59a77c46df9d1480d2e /pkg
parent84076bf95f485bccfd9e03108fb69a1f72b42918 (diff)
downloadpodman-4d7626cc897d821bd8c931d1dde1fa0ab236f4f9.tar.gz
podman-4d7626cc897d821bd8c931d1dde1fa0ab236f4f9.tar.bz2
podman-4d7626cc897d821bd8c931d1dde1fa0ab236f4f9.zip
Fix handling of entrypoint
If a user specifies an entrypoint of "" then we should not use the images entrypoint. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/api/handlers/compat/containers_create.go2
-rw-r--r--pkg/specgen/generate/oci.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go
index 031e30b7e..cbee8a8b6 100644
--- a/pkg/api/handlers/compat/containers_create.go
+++ b/pkg/api/handlers/compat/containers_create.go
@@ -81,7 +81,7 @@ func makeCreateConfig(ctx context.Context, containerConfig *config.Config, input
workDir = input.WorkingDir
}
- if len(input.Entrypoint) == 0 {
+ if input.Entrypoint == nil {
entrypointSlice, err := newImage.Entrypoint(ctx)
if err != nil {
return createconfig.CreateConfig{}, err
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index b33fe0e25..f279aac1c 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -86,7 +86,7 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image
finalCommand := []string{}
entrypoint := s.Entrypoint
- if len(entrypoint) == 0 && img != nil {
+ if entrypoint == nil && img != nil {
newEntry, err := img.Entrypoint(ctx)
if err != nil {
return nil, err