summaryrefslogtreecommitdiff
path: root/cmd/podman/spec.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-05-01 12:08:52 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-03 12:23:12 +0000
commitab7e2a695633dbe45b0af3332b813b0efdfbf203 (patch)
tree74de1a9b76fbc3ab628f083561ed60c2576836be /cmd/podman/spec.go
parent16c997de624be049dda5d2182ec70d979194b002 (diff)
downloadpodman-ab7e2a695633dbe45b0af3332b813b0efdfbf203.tar.gz
podman-ab7e2a695633dbe45b0af3332b813b0efdfbf203.tar.bz2
podman-ab7e2a695633dbe45b0af3332b813b0efdfbf203.zip
Store user Volumes, Entrypoint, Command in database
We need these for commit, and they cannot be properly deduced from just the OCI spec, so save them in the database so we can retrieve them for commit. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #700 Approved by: rhatdan
Diffstat (limited to 'cmd/podman/spec.go')
-rw-r--r--cmd/podman/spec.go11
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 {