summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
authorMatej Vasek <mvasek@redhat.com>2021-11-28 20:34:07 +0100
committerMatej Vasek <mvasek@redhat.com>2021-11-29 15:57:56 +0100
commit697ff213dd36b78a4857c07b4c6a82246d0a875f (patch)
tree172350015451a7759d0a385aa66dc16b8b9c50a3 /cmd/podman
parent3d19f1a7fac5705518693cad3f2c7f94dcc2f1d4 (diff)
downloadpodman-697ff213dd36b78a4857c07b4c6a82246d0a875f.tar.gz
podman-697ff213dd36b78a4857c07b4c6a82246d0a875f.tar.bz2
podman-697ff213dd36b78a4857c07b4c6a82246d0a875f.zip
fix: parsing of HostConfig.Mounts for container create
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/common/create_opts.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index aacdfd274..abb55f8c7 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -103,7 +103,9 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
addField(&builder, "type", string(m.Type))
addField(&builder, "source", m.Source)
addField(&builder, "target", m.Target)
- addField(&builder, "ro", strconv.FormatBool(m.ReadOnly))
+ if m.ReadOnly {
+ addField(&builder, "ro", "true")
+ }
addField(&builder, "consistency", string(m.Consistency))
// Map any specialized mount options that intersect between *Options and cli options
switch m.Type {