From f657e5551e8757039f4b80401b56b2f46006d32f Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Tue, 28 Jul 2020 18:17:13 +0900 Subject: compat/info.go: TrimPrefix(CGroupsVersion, "v") For compatibility with Docker: https://github.com/moby/moby/blob/846b7e24ba549a972a2672ffdd88b140da688736/api/swagger.yaml#L4528-L4534 Signed-off-by: Akihiro Suda --- pkg/api/handlers/compat/info.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go index 6c44393cc..c0033eab4 100644 --- a/pkg/api/handlers/compat/info.go +++ b/pkg/api/handlers/compat/info.go @@ -119,7 +119,7 @@ func GetInfo(w http.ResponseWriter, r *http.Request) { BuildahVersion: infoData.Host.BuildahVersion, CPURealtimePeriod: sysInfo.CPURealtimePeriod, CPURealtimeRuntime: sysInfo.CPURealtimeRuntime, - CgroupVersion: infoData.Host.CGroupsVersion, + CgroupVersion: strings.TrimPrefix(infoData.Host.CGroupsVersion, "v"), Rootless: rootless.IsRootless(), SwapFree: infoData.Host.SwapFree, SwapTotal: infoData.Host.SwapTotal, -- cgit v1.2.3-54-g00ecf