mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #3537 from QiWang19/volumeabs
fix bug convert volume host path to absolute
This commit is contained in:
@ -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))
|
||||
|
Reference in New Issue
Block a user