diff options
author | baude <bbaude@redhat.com> | 2020-10-14 13:53:12 -0500 |
---|---|---|
committer | baude <bbaude@redhat.com> | 2020-10-20 12:06:59 -0500 |
commit | eb91d66c4aa0d2d75a5787ab7013cef88d8c9f4f (patch) | |
tree | 1dc9988ebc7470e05bd80622982ab9a5926d0d5b /pkg/specgen | |
parent | 35b4cb196545eee3b072083e716ad4588e0bb486 (diff) | |
download | podman-eb91d66c4aa0d2d75a5787ab7013cef88d8c9f4f.tar.gz podman-eb91d66c4aa0d2d75a5787ab7013cef88d8c9f4f.tar.bz2 podman-eb91d66c4aa0d2d75a5787ab7013cef88d8c9f4f.zip |
refactor api compatibility container creation to specgen
when using the compatibility layer to create containers, it used code paths to the pkg/spec which is the old implementation of containers. it is error prone and no longer being maintained. rather that fixing things in spec, migrating to specgen usage seems to make the most sense. furthermore, any fixes to the compat create will not need to be ported later.
Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/generate/oci.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go index f02432f5b..8454458a8 100644 --- a/pkg/specgen/generate/oci.go +++ b/pkg/specgen/generate/oci.go @@ -110,7 +110,7 @@ func makeCommand(ctx context.Context, s *specgen.SpecGenerator, img *image.Image // Only use image command if the user did not manually set an // entrypoint. command := s.Command - if command == nil && img != nil && s.Entrypoint == nil { + if (command == nil || len(command) == 0) && img != nil && (s.Entrypoint == nil || len(s.Entrypoint) == 0) { newCmd, err := img.Cmd(ctx) if err != nil { return nil, err |