summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create_opts.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common/create_opts.go')
-rw-r--r--cmd/podman/common/create_opts.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 6dc43dbc6..af53a3b67 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -78,6 +78,7 @@ type ContainerCLIOpts struct {
OverrideVariant string
PID string
PIDsLimit *int64
+ Platform string
Pod string
PodIDFile string
PreserveFDs uint
@@ -211,12 +212,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
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 := make([]net.IP, 0, len(cc.HostConfig.DNS))
for _, d := range cc.HostConfig.DNS {
@@ -373,7 +368,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
UserNS: string(cc.HostConfig.UsernsMode),
UTS: string(cc.HostConfig.UTSMode),
Mount: mounts,
- Volume: volumes,
VolumesFrom: cc.HostConfig.VolumesFrom,
Workdir: cc.Config.WorkingDir,
Net: &netInfo,
@@ -388,6 +382,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 {
devices := make([]string, 0, len(cc.HostConfig.BlkioWeightDevice))
for _, d := range cc.HostConfig.BlkioWeightDevice {