From 02671a103f7991a3c472f90d343a5979f3d3636a Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 27 Apr 2020 10:36:41 -0400 Subject: Add support for volumes-from, image volumes, init This should complete Podmanv2's support for volume-related flags. Most code was sourced from the old pkg/spec implementation with modifications to account for the split between frontend flags (volume, mount, tmpfs) and the backend flags implemented here. Also enables tests for podman run with volumes Signed-off-by: Matthew Heon --- cmd/podman/common/specgen.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'cmd') diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index ba9022aff..e57581ca0 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -406,13 +406,11 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string s.StaticMAC = c.Net.StaticMAC s.UseImageHosts = c.Net.NoHosts - // deferred, must be added on libpod side - //var ImageVolumes map[string]struct{} - //if data != nil && c.String("image-volume") != "ignore" { - // ImageVolumes = data.Config.Volumes - //} - s.ImageVolumeMode = c.ImageVolume + if s.ImageVolumeMode == "bind" { + s.ImageVolumeMode = "anonymous" + } + systemd := c.SystemdD == "always" if !systemd && command != nil { x, err := strconv.ParseBool(c.SystemdD) -- cgit v1.2.3-54-g00ecf