mirror of
https://github.com/containers/podman.git
synced 2025-06-26 12:56:45 +08:00
add commas between mount options
when formatting mount options into a string for the compat container create, the options need to be comma delimited. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -204,10 +204,10 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup
|
|||||||
for _, m := range cc.HostConfig.Mounts {
|
for _, m := range cc.HostConfig.Mounts {
|
||||||
mount := fmt.Sprintf("type=%s", m.Type)
|
mount := fmt.Sprintf("type=%s", m.Type)
|
||||||
if len(m.Source) > 0 {
|
if len(m.Source) > 0 {
|
||||||
mount += fmt.Sprintf("source=%s", m.Source)
|
mount += fmt.Sprintf(",source=%s", m.Source)
|
||||||
}
|
}
|
||||||
if len(m.Target) > 0 {
|
if len(m.Target) > 0 {
|
||||||
mount += fmt.Sprintf("dest=%s", m.Target)
|
mount += fmt.Sprintf(",dst=%s", m.Target)
|
||||||
}
|
}
|
||||||
mounts = append(mounts, mount)
|
mounts = append(mounts, mount)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user