install: support OCI containers as root

This commit is contained in:
b8rky
2023-04-01 20:08:00 +00:00
parent 010d7b3f54
commit f18475ba4d

View File

@@ -304,6 +304,7 @@ check_run_command_as_root() {
# Allow Azure Pipelines/GitHub Actions/Docker/Concourse/Kubernetes to do everything as root (as it's normal there)
[[ -f /.dockerenv ]] && return
[[ -f /run/.containerenv ]] && return
[[ -f /proc/1/cgroup ]] && grep -E "azpl_job|actions_job|docker|garden|kubepods" -q /proc/1/cgroup && return
abort "Don't run this as root!"