diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-02-16 17:03:32 -0500 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2021-02-18 10:19:54 -0500 |
commit | 865769d911254a0f2f650322825391f5b31413a2 (patch) | |
tree | ddcfa66ab4d7b8fdece5b197a255a9c1019865e7 /pkg/specgen/generate | |
parent | af62cb3ca9ab516627c5fb991d541555f8af13f4 (diff) | |
download | podman-865769d911254a0f2f650322825391f5b31413a2.tar.gz podman-865769d911254a0f2f650322825391f5b31413a2.tar.bz2 podman-865769d911254a0f2f650322825391f5b31413a2.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')
-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 e62131244..d1d2f552e 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. |