summaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/spec')
-rw-r--r--pkg/spec/spec.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/spec/spec.go b/pkg/spec/spec.go
index 893ae3cab..5e97620cc 100644
--- a/pkg/spec/spec.go
+++ b/pkg/spec/spec.go
@@ -180,7 +180,16 @@ func (config *CreateConfig) createConfigToOCISpec(runtime *libpod.Runtime, userM
g.AddMount(cgroupMnt)
}
g.SetProcessCwd(config.WorkDir)
- g.SetProcessArgs(config.Command)
+
+ ProcessArgs := make([]string, 0)
+ if len(config.Entrypoint) > 0 {
+ ProcessArgs = config.Entrypoint
+ }
+ if len(config.Command) > 0 {
+ ProcessArgs = append(ProcessArgs, config.Command...)
+ }
+ g.SetProcessArgs(ProcessArgs)
+
g.SetProcessTerminal(config.Tty)
for key, val := range config.Annotations {