diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index 7b63848c61ad..8cb586251a98 100644 --- a/pkg/domain/infra/abi/containers_runlabel.go +++ b/pkg/domain/infra/abi/containers_runlabel.go @@ -173,6 +173,13 @@ func generateRunlabelCommand(runlabel string, img *libimage.Image, inputName str return "" } return d + case "HOME": + h, err := os.UserHomeDir() + if err != nil { + logrus.Warnf("Unable to determine user's home directory, got %s", err) + return "" + } + return h } return "" } diff --git a/test/system/037-runlabel.bats b/test/system/037-runlabel.bats index 3056d6aca740..b59b8c1f8855 100644 --- a/test/system/037-runlabel.bats +++ b/test/system/037-runlabel.bats @@ -12,16 +12,16 @@ load helpers rand3=$(random_string 30) cat >$containerfile <