From 5330e0dff5509f6448322ef9602224c595fec0a8 Mon Sep 17 00:00:00 2001 From: Bernhard B Date: Tue, 26 Aug 2025 23:15:47 +0200 Subject: [PATCH] fixed getContainerId() function * since switching to podman builds in the CI, the getContainerId() function wasn't working anymore. As per default the hostname of the container is the same as the container id, we use the GetHostname() function to get the container id inside the container. --- src/client/client.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/client/client.go b/src/client/client.go index 816f612..d38fd47 100644 --- a/src/client/client.go +++ b/src/client/client.go @@ -288,16 +288,7 @@ func parseWhitespaceDelimitedKeyValueStringList(in string, keys []string) []map[ } func getContainerId() (string, error) { - data, err := ioutil.ReadFile("/proc/1/cpuset") - if err != nil { - return "", err - } - lines := strings.Split(string(data), "\n") - if len(lines) == 0 { - return "", errors.New("Couldn't get docker container id (empty)") - } - containerId := strings.Replace(lines[0], "/docker/", "", -1) - return containerId, nil + return os.Hostname() } func ConvertGroupIdToInternalGroupId(id string) (string, error) {