diff options
Diffstat (limited to 'cmd/podman/spec.go')
-rw-r--r-- | cmd/podman/spec.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmd/podman/spec.go b/cmd/podman/spec.go index fbe611cc3..e807ab642 100644 --- a/cmd/podman/spec.go +++ b/cmd/podman/spec.go @@ -653,9 +653,18 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er } if len(c.Volumes) != 0 { - options = append(options, libpod.WithUserVolumes()) + options = append(options, libpod.WithUserVolumes(c.Volumes)) } + if len(c.Command) != 0 { + options = append(options, libpod.WithCommand(c.Command)) + } + + // Add entrypoint unconditionally + // If it's empty it's because it was explicitly set to "" or the image + // does not have one + options = append(options, libpod.WithEntrypoint(c.Entrypoint)) + if c.NetMode.IsContainer() { connectedCtr, err := c.Runtime.LookupContainer(c.NetMode.ConnectedContainer()) if err != nil { |