mirror of
https://github.com/containers/podman.git
synced 2025-06-19 16:33:24 +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
|
||||
options are the same as the Linux default `mount` flags. If you do not specify
|
||||
any options, the systems uses the following options:
|
||||
`rw,noexec,nosuid,nodev,size=65536k`.
|
||||
`rw,noexec,nosuid,nodev`.
|
||||
|
||||
**--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
|
||||
options are the same as the Linux default `mount` flags. If you do not specify
|
||||
any options, the systems uses the following options:
|
||||
`rw,noexec,nosuid,nodev,size=65536k`.
|
||||
`rw,noexec,nosuid,nodev`.
|
||||
|
||||
**--tty**, **-t**=*true|false*
|
||||
|
||||
|
@ -168,14 +168,14 @@ func (config *CreateConfig) parseVolumes(runtime *libpod.Runtime) ([]spec.Mount,
|
||||
"/run": false,
|
||||
}
|
||||
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 {
|
||||
if _, ok := baseMounts[dest]; ok {
|
||||
continue
|
||||
}
|
||||
localOpts := options
|
||||
if dest == "/run" {
|
||||
localOpts = append(localOpts, "noexec")
|
||||
localOpts = append(localOpts, "noexec", "size=65536k")
|
||||
}
|
||||
baseMounts[dest] = spec.Mount{
|
||||
Destination: dest,
|
||||
|
@ -92,9 +92,6 @@ func ProcessTmpfsOptions(options []string) ([]string, error) {
|
||||
if !foundWrite {
|
||||
baseOpts = append(baseOpts, "rw")
|
||||
}
|
||||
if !foundSize {
|
||||
baseOpts = append(baseOpts, "size=65536k")
|
||||
}
|
||||
if !foundProp {
|
||||
baseOpts = append(baseOpts, "rprivate")
|
||||
}
|
||||
|
Reference in New Issue
Block a user