diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-02 12:58:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 12:58:59 -0800 |
commit | b9181cf1ef255771a92a7258367826dbc3f1e091 (patch) | |
tree | 2fd0a9806741252f24c3bd1315181634891ea552 /cmd/podman/common/create_opts.go | |
parent | f4304c6592a7db737f25751b1f61beadd914ca69 (diff) | |
parent | 43d010bd0f9e01d1652e284c77d1839a4bf16607 (diff) | |
download | podman-b9181cf1ef255771a92a7258367826dbc3f1e091.tar.gz podman-b9181cf1ef255771a92a7258367826dbc3f1e091.tar.bz2 podman-b9181cf1ef255771a92a7258367826dbc3f1e091.zip |
Merge pull request #9512 from mheon/fix_9511
Fix parsing of Tmpfs field in compat create
Diffstat (limited to 'cmd/podman/common/create_opts.go')
-rw-r--r-- | cmd/podman/common/create_opts.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index 78611371d..f945c9c54 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -311,6 +311,15 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup netInfo.CNINetworks = []string{string(cc.HostConfig.NetworkMode)} } + parsedTmp := make([]string, 0, len(cc.HostConfig.Tmpfs)) + for path, options := range cc.HostConfig.Tmpfs { + finalString := path + if options != "" { + finalString += ":" + options + } + parsedTmp = append(parsedTmp, finalString) + } + // Note: several options here are marked as "don't need". this is based // on speculation by Matt and I. We think that these come into play later // like with start. We believe this is just a difference in podman/compat @@ -367,7 +376,7 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, cgroup StorageOpt: stringMaptoArray(cc.HostConfig.StorageOpt), Sysctl: stringMaptoArray(cc.HostConfig.Sysctls), Systemd: "true", // podman default - TmpFS: stringMaptoArray(cc.HostConfig.Tmpfs), + TmpFS: parsedTmp, TTY: cc.Config.Tty, User: cc.Config.User, UserNS: string(cc.HostConfig.UsernsMode), |