diff options
author | Matthew Heon <matthew.heon@pm.me> | 2020-04-27 10:36:41 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-04-27 13:13:21 -0400 |
commit | 02671a103f7991a3c472f90d343a5979f3d3636a (patch) | |
tree | 4b5c8e29add304c8b3f327db7240703105ab4150 /cmd/podman/common/specgen.go | |
parent | ca1c674d2e027b563c3e9fd92c335eb3f5e5e05d (diff) | |
download | podman-02671a103f7991a3c472f90d343a5979f3d3636a.tar.gz podman-02671a103f7991a3c472f90d343a5979f3d3636a.tar.bz2 podman-02671a103f7991a3c472f90d343a5979f3d3636a.zip |
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 <matthew.heon@pm.me>
Diffstat (limited to 'cmd/podman/common/specgen.go')
-rw-r--r-- | cmd/podman/common/specgen.go | 10 |
1 files changed, 4 insertions, 6 deletions
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) |