mirror of https://github.com/containers/podman.git
Trivial refactor on volume addition
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #700 Approved by: rhatdan
This commit is contained in:
parent
6ebb90f951
commit
e6ec1aaffe
|
@ -658,8 +658,7 @@ func (c *createConfig) GetContainerCreateOptions() ([]libpod.CtrCreateOption, er
|
||||||
// others, if they are included
|
// others, if they are included
|
||||||
volumes := make([]string, 0, len(c.Volumes))
|
volumes := make([]string, 0, len(c.Volumes))
|
||||||
for _, vol := range c.Volumes {
|
for _, vol := range c.Volumes {
|
||||||
splitVol := strings.Split(vol, ":")
|
volumes = append(volumes, strings.SplitN(vol, ":", 2)[0])
|
||||||
volumes = append(volumes, splitVol[0])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
options = append(options, libpod.WithUserVolumes(volumes))
|
options = append(options, libpod.WithUserVolumes(volumes))
|
||||||
|
|
Loading…
Reference in New Issue