Merge pull request #16826 from alexlarsson/quadlet-more-defaults

quadlet: Default VolatileTmp to off
This commit is contained in:
OpenShift Merge Robot 2022-12-14 10:35:41 -05:00 committed by GitHub
commit 2a48296b0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -194,9 +194,9 @@ The timezone to run the container in.
If enabled, the container will have a minimal init process inside the
container that forwards signals and reaps processes.
#### `VolatileTmp=` (default to `yes`)
#### `VolatileTmp=` (default to `no`, or `yes` if `ReadOnly` enabled)
If enabled (and it is by default), the container will have a fresh tmpfs mounted on `/tmp`.
If enabled, the container will have a fresh tmpfs mounted on `/tmp`.
**NOTE:** Podman will automatically copy any content from the image onto the tmpfs

View file

@ -329,8 +329,7 @@ func ConvertContainer(container *parser.UnitFile, isUser bool) (*parser.UnitFile
podman.add("--read-only")
}
// We want /tmp to be a tmpfs, like on rhel host
volatileTmp := container.LookupBoolean(ContainerGroup, KeyVolatileTmp, true)
volatileTmp := container.LookupBoolean(ContainerGroup, KeyVolatileTmp, false)
if volatileTmp {
/* Read only mode already has a tmpfs by default */
if !readOnly {

View file

@ -3,4 +3,5 @@
[Container]
Image=localhost/imagename
VolatileTmp=yes
ReadOnly=no