Merge branch 'siemonster_improve_k8s' of https://github.com/harduino/Shuffle into harduino-siemonster_improve_k8s

This commit is contained in:
frikky
2021-02-26 08:03:31 +01:00
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ func getThisContainerId() {
}
if fCol != "" {
cmd := fmt.Sprintf("cat /proc/self/cgroup | grep memory | tail -1 | cut -d/ -f%s", fCol)
cmd := fmt.Sprintf("cat /proc/self/cgroup | grep memory | tail -1 | cut -d/ -f%s | grep -o -E '[0-9A-z]{64}'", fCol)
out, err := exec.Command("bash", "-c", cmd).Output()
if err == nil {
containerId = strings.TrimSpace(string(out))