diff --git a/pkg/domain/infra/abi/containers_runlabel.go b/pkg/domain/infra/abi/containers_runlabel.go index 7b63848c61..2a4119996f 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: %s", err) + return "" + } + return h } return "" } diff --git a/test/system/037-runlabel.bats b/test/system/037-runlabel.bats index 3056d6aca7..b59b8c1f88 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 <