From 697ff213dd36b78a4857c07b4c6a82246d0a875f Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Sun, 28 Nov 2021 20:34:07 +0100 Subject: fix: parsing of HostConfig.Mounts for container create Signed-off-by: Matej Vasek --- cmd/podman/common/create_opts.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cmd/podman/common') 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 { -- cgit v1.2.3-54-g00ecf