aboutsummaryrefslogtreecommitdiff
path: root/libpod/volume_internal.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-09-06 13:52:13 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-09-09 17:17:39 -0400
commitb6106341fb3a749ec37e59ee3290257a1729def1 (patch)
tree071d7849967793d1d57af0921e24ad71f8e1ac96 /libpod/volume_internal.go
parent290def5b921ca4b557e051e79963de7f429cfcd7 (diff)
downloadpodman-b6106341fb3a749ec37e59ee3290257a1729def1.tar.gz
podman-b6106341fb3a749ec37e59ee3290257a1729def1.tar.bz2
podman-b6106341fb3a749ec37e59ee3290257a1729def1.zip
When first mounting any named volume, copy up
Previously, we only did this for volumes created at the same time as the container. However, this is not correct behavior - Docker does so for all named volumes, even those made with 'podman volume create' and mounted into a container later. Fixes #3945 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/volume_internal.go')
-rw-r--r--libpod/volume_internal.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/libpod/volume_internal.go b/libpod/volume_internal.go
index 2e886e1b0..42b935e7c 100644
--- a/libpod/volume_internal.go
+++ b/libpod/volume_internal.go
@@ -11,9 +11,11 @@ import (
func newVolume(runtime *Runtime) (*Volume, error) {
volume := new(Volume)
volume.config = new(VolumeConfig)
+ volume.state = new(VolumeState)
volume.runtime = runtime
volume.config.Labels = make(map[string]string)
volume.config.Options = make(map[string]string)
+ volume.state.NeedsCopyUp = true
return volume, nil
}