Add version check

Signed-off-by: Michael Winters <1688867+mwinters0@users.noreply.github.com>
This commit is contained in:
Michael Winters 2025-05-15 15:11:34 -05:00
parent 222de0e0bf
commit f7280c4cd2
1 changed files with 6 additions and 4 deletions

View File

@ -464,10 +464,12 @@ func createContainer(container, image, release, authFile string, showCommandToEn
"--volume", runtimeDirectoryMountArg,
}...)
if runtime, _ := podman.GetRuntimeName(); runtime == "crun" {
createArgs = append(createArgs, []string{
"--group-add", "keep-groups",
}...)
if podman.CheckVersion("3.2.0") {
if runtime, _ := podman.GetRuntimeName(); runtime == "crun" {
createArgs = append(createArgs, []string{
"--group-add", "keep-groups",
}...)
}
}
createArgs = append(createArgs, avahiSocketMount...)