summaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-02-20 18:16:52 -0500
committerGitHub <noreply@github.com>2020-02-20 18:16:52 -0500
commitbfeaabb35054119bc2ce93f09a2e3aeee43cc6df (patch)
treef97c49decb2e37b2526b0771bfa1fe0891c623c5 /pkg/spec
parenta8896d5b6755be23f13f5c4cc0deb60e11155039 (diff)
parent40fa7e99317a32046fec2442b61dc524f63e52cd (diff)
downloadpodman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.tar.gz
podman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.tar.bz2
podman-bfeaabb35054119bc2ce93f09a2e3aeee43cc6df.zip
Merge pull request #5222 from mheon/fix_5219
Use cleaned destination path for indexing image volumes
Diffstat (limited to 'pkg/spec')
-rw-r--r--pkg/spec/storage.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/spec/storage.go b/pkg/spec/storage.go
index e37fa2451..c365701de 100644
--- a/pkg/spec/storage.go
+++ b/pkg/spec/storage.go
@@ -739,6 +739,7 @@ func (config *CreateConfig) getImageVolumes() (map[string]spec.Mount, map[string
for vol := range config.BuiltinImgVolumes {
cleanDest := filepath.Clean(vol)
+ logrus.Debugf("Adding image volume at %s", cleanDest)
if config.ImageVolumeType == "tmpfs" {
// Tmpfs image volumes are handled as mounts
mount := spec.Mount{
@@ -747,13 +748,13 @@ func (config *CreateConfig) getImageVolumes() (map[string]spec.Mount, map[string
Type: TypeTmpfs,
Options: []string{"rprivate", "rw", "nodev", "exec"},
}
- mounts[vol] = mount
+ mounts[cleanDest] = mount
} else {
// Anonymous volumes have no name.
namedVolume := new(libpod.ContainerNamedVolume)
namedVolume.Options = []string{"rprivate", "rw", "nodev", "exec"}
namedVolume.Dest = cleanDest
- volumes[vol] = namedVolume
+ volumes[cleanDest] = namedVolume
}
}