diff options
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r-- | cmd/podman/common/specgen.go | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index 1e857ea01..10ae0bb2d 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -548,22 +548,31 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string } s.SeccompPolicy = c.SeccompPolicy + + // TODO: should parse out options + s.VolumesFrom = c.VolumesFrom + + // Only add read-only tmpfs mounts in case that we are read-only and the + // read-only tmpfs flag has been set. + mounts, volumes, err := parseVolumes(c.Volume, c.Mount, c.TmpFS, (c.ReadOnlyTmpFS && c.ReadOnly)) + if err != nil { + return err + } + s.Mounts = mounts + s.Volumes = volumes + // TODO any idea why this was done - // storage.go from spec/ - // grab it - //volumes := rtc.Containers.Volumes + //devices := rtc.Containers.Devices // TODO conflict on populate? - //if v := c.Volume; len(v)> 0 { - // s.Volumes = append(volumes, c.StringSlice("volume")...) + // + //if c.Changed("device") { + // devices = append(devices, c.StringSlice("device")...) //} - //s.volu - - //s.Mounts = c.Mount - s.VolumesFrom = c.VolumesFrom for _, dev := range c.Devices { s.Devices = append(s.Devices, specs.LinuxDevice{Path: dev}) } + // TODO things i cannot find in spec // we dont think these are in the spec // init - initbinary |