summaryrefslogtreecommitdiff
path: root/pkg/spec
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-07-12 22:12:21 +0200
committerGitHub <noreply@github.com>2019-07-12 22:12:21 +0200
commit62352b280b981db9f8e3bf2d89acf02d212a04cf (patch)
treeaefb868d4b1e32e48d2caf866c4b9848c5c4148f /pkg/spec
parent686da0d60c798d175af729ab27023f6a038be08f (diff)
parentf50f91079a784d2c09f5ac8a3a74dc9b380c94d3 (diff)
downloadpodman-62352b280b981db9f8e3bf2d89acf02d212a04cf.tar.gz
podman-62352b280b981db9f8e3bf2d89acf02d212a04cf.tar.bz2
podman-62352b280b981db9f8e3bf2d89acf02d212a04cf.zip
Merge pull request #3537 from QiWang19/volumeabs
fix bug convert volume host path to absolute
Diffstat (limited to 'pkg/spec')
-rw-r--r--pkg/spec/storage.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/spec/storage.go b/pkg/spec/storage.go
index ed767f5ba..88f1f6dc1 100644
--- a/pkg/spec/storage.go
+++ b/pkg/spec/storage.go
@@ -211,6 +211,13 @@ func (config *CreateConfig) parseVolumes(runtime *libpod.Runtime) ([]spec.Mount,
}
mount.Options = opts
}
+ if mount.Type == TypeBind {
+ absSrc, err := filepath.Abs(mount.Source)
+ if err != nil {
+ return nil, nil, errors.Wrapf(err, "error getting absolute path of %s", mount.Source)
+ }
+ mount.Source = absSrc
+ }
finalMounts = append(finalMounts, mount)
}
finalVolumes := make([]*libpod.ContainerNamedVolume, 0, len(baseVolumes))