summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/specgen/generate/oci.go4
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