mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
Merge pull request #3805 from ashley-cui/tmpfs
Remove --tmpfs size default
This commit is contained in:
@ -715,7 +715,7 @@ $ podman run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image
|
|||||||
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
|
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
|
||||||
options are the same as the Linux default `mount` flags. If you do not specify
|
options are the same as the Linux default `mount` flags. If you do not specify
|
||||||
any options, the systems uses the following options:
|
any options, the systems uses the following options:
|
||||||
`rw,noexec,nosuid,nodev,size=65536k`.
|
`rw,noexec,nosuid,nodev`.
|
||||||
|
|
||||||
**--tty**, **-t**=*true|false*
|
**--tty**, **-t**=*true|false*
|
||||||
|
|
||||||
|
@ -752,7 +752,7 @@ $ podman run -d --tmpfs /tmp:rw,size=787448k,mode=1777 my_image
|
|||||||
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
|
This command mounts a `tmpfs` at `/tmp` within the container. The supported mount
|
||||||
options are the same as the Linux default `mount` flags. If you do not specify
|
options are the same as the Linux default `mount` flags. If you do not specify
|
||||||
any options, the systems uses the following options:
|
any options, the systems uses the following options:
|
||||||
`rw,noexec,nosuid,nodev,size=65536k`.
|
`rw,noexec,nosuid,nodev`.
|
||||||
|
|
||||||
**--tty**, **-t**=*true|false*
|
**--tty**, **-t**=*true|false*
|
||||||
|
|
||||||
|
@ -168,14 +168,14 @@ func (config *CreateConfig) parseVolumes(runtime *libpod.Runtime) ([]spec.Mount,
|
|||||||
"/run": false,
|
"/run": false,
|
||||||
}
|
}
|
||||||
if config.ReadOnlyRootfs && config.ReadOnlyTmpfs {
|
if config.ReadOnlyRootfs && config.ReadOnlyTmpfs {
|
||||||
options := []string{"rw", "rprivate", "nosuid", "nodev", "tmpcopyup", "size=65536k"}
|
options := []string{"rw", "rprivate", "nosuid", "nodev", "tmpcopyup"}
|
||||||
for dest := range readonlyTmpfs {
|
for dest := range readonlyTmpfs {
|
||||||
if _, ok := baseMounts[dest]; ok {
|
if _, ok := baseMounts[dest]; ok {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
localOpts := options
|
localOpts := options
|
||||||
if dest == "/run" {
|
if dest == "/run" {
|
||||||
localOpts = append(localOpts, "noexec")
|
localOpts = append(localOpts, "noexec", "size=65536k")
|
||||||
}
|
}
|
||||||
baseMounts[dest] = spec.Mount{
|
baseMounts[dest] = spec.Mount{
|
||||||
Destination: dest,
|
Destination: dest,
|
||||||
|
@ -92,9 +92,6 @@ func ProcessTmpfsOptions(options []string) ([]string, error) {
|
|||||||
if !foundWrite {
|
if !foundWrite {
|
||||||
baseOpts = append(baseOpts, "rw")
|
baseOpts = append(baseOpts, "rw")
|
||||||
}
|
}
|
||||||
if !foundSize {
|
|
||||||
baseOpts = append(baseOpts, "size=65536k")
|
|
||||||
}
|
|
||||||
if !foundProp {
|
if !foundProp {
|
||||||
baseOpts = append(baseOpts, "rprivate")
|
baseOpts = append(baseOpts, "rprivate")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user