mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
Merge pull request #8540 from baude/compatecreatevols
compat create should use bindings
This commit is contained in:
@ -211,12 +211,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
|||||||
mounts = append(mounts, mount)
|
mounts = append(mounts, mount)
|
||||||
}
|
}
|
||||||
|
|
||||||
// volumes
|
|
||||||
volumes := make([]string, 0, len(cc.Config.Volumes))
|
|
||||||
for v := range cc.Config.Volumes {
|
|
||||||
volumes = append(volumes, v)
|
|
||||||
}
|
|
||||||
|
|
||||||
// dns
|
// dns
|
||||||
dns := make([]net.IP, 0, len(cc.HostConfig.DNS))
|
dns := make([]net.IP, 0, len(cc.HostConfig.DNS))
|
||||||
for _, d := range cc.HostConfig.DNS {
|
for _, d := range cc.HostConfig.DNS {
|
||||||
@ -373,7 +367,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
|||||||
UserNS: string(cc.HostConfig.UsernsMode),
|
UserNS: string(cc.HostConfig.UsernsMode),
|
||||||
UTS: string(cc.HostConfig.UTSMode),
|
UTS: string(cc.HostConfig.UTSMode),
|
||||||
Mount: mounts,
|
Mount: mounts,
|
||||||
Volume: volumes,
|
|
||||||
VolumesFrom: cc.HostConfig.VolumesFrom,
|
VolumesFrom: cc.HostConfig.VolumesFrom,
|
||||||
Workdir: cc.Config.WorkingDir,
|
Workdir: cc.Config.WorkingDir,
|
||||||
Net: &netInfo,
|
Net: &netInfo,
|
||||||
@ -388,6 +381,10 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// volumes
|
||||||
|
if volumes := cc.HostConfig.Binds; len(volumes) > 0 {
|
||||||
|
cliOpts.Volume = volumes
|
||||||
|
}
|
||||||
if len(cc.HostConfig.BlkioWeightDevice) > 0 {
|
if len(cc.HostConfig.BlkioWeightDevice) > 0 {
|
||||||
devices := make([]string, 0, len(cc.HostConfig.BlkioWeightDevice))
|
devices := make([]string, 0, len(cc.HostConfig.BlkioWeightDevice))
|
||||||
for _, d := range cc.HostConfig.BlkioWeightDevice {
|
for _, d := range cc.HostConfig.BlkioWeightDevice {
|
||||||
|
Reference in New Issue
Block a user