diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-16 17:03:32 -0500 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-17 07:00:53 -0500 |
commit | 12a577aea55bc5967913da6306d819065c0cfb76 (patch) | |
tree | 6c4c7c96a9ebb470881d184c165728572c6efc0a /pkg/specgen/generate/oci.go | |
parent | 50042120e947fc7aee601f0c65ea485daf604ee1 (diff) | |
download | podman-12a577aea55bc5967913da6306d819065c0cfb76.tar.gz podman-12a577aea55bc5967913da6306d819065c0cfb76.tar.bz2 podman-12a577aea55bc5967913da6306d819065c0cfb76.zip |
Ignore entrypoint=[\"\"]
We recieved an issue with an image that was built with
entrypoint=[""]
This blows up on Podman, but works on Docker.
When we setup the OCI Runtime, we should drop
entrypoint if it is == [""]
https://github.com/containers/podman/issues/9377
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen/generate/oci.go')
-rw-r--r-- | pkg/specgen/generate/oci.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index 1a0ec08a5..eefe45dfe 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -105,7 +105,10 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image entrypoint = newEntry } - finalCommand = append(finalCommand, entrypoint...) + // Don't append the entrypoint if it is [""] + if len(entrypoint) != 1 || entrypoint[0] != "" { + finalCommand = append(finalCommand, entrypoint...) + } // Only use image command if the user did not manually set an // entrypoint. |