diff --git a/cmd/podman/root_cgroups_linux.go b/cmd/podman/root_cgroups_linux.go index fee19873f4..54c6344054 100644 --- a/cmd/podman/root_cgroups_linux.go +++ b/cmd/podman/root_cgroups_linux.go @@ -1,13 +1,18 @@ -//go:build linux +//go:build linux && !remote package main import ( "github.com/sirupsen/logrus" "go.podman.io/common/pkg/cgroups" + "go.podman.io/podman/v6/cmd/podman/registry" ) func checkSupportedCgroups() { + if registry.IsRemote() { + // In remote mode we should not error for missing cgroups as just the server needs it. + return + } unified, err := cgroups.IsCgroup2UnifiedMode() if err != nil { logrus.Fatalf("Error determining cgroups mode") diff --git a/cmd/podman/root_cgroups_unsupported.go b/cmd/podman/root_cgroups_unsupported.go index 0ec0c7c1d9..1412065947 100644 --- a/cmd/podman/root_cgroups_unsupported.go +++ b/cmd/podman/root_cgroups_unsupported.go @@ -1,7 +1,7 @@ -//go:build !linux +//go:build !linux || remote package main func checkSupportedCgroups() { - // NOP on Non Linux + // NOP on Non Linux or Remote }