diff options
author | Matthew Heon <matthew.heon@pm.me> | 2019-09-06 13:52:13 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2019-09-09 17:17:39 -0400 |
commit | b6106341fb3a749ec37e59ee3290257a1729def1 (patch) | |
tree | 071d7849967793d1d57af0921e24ad71f8e1ac96 /libpod/volume_internal.go | |
parent | 290def5b921ca4b557e051e79963de7f429cfcd7 (diff) | |
download | podman-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.go | 2 |
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 } |