From 089c473c878824f3c40ace48c0d34d944dc9c498 Mon Sep 17 00:00:00 2001 From: Kanako the Gay Date: Wed, 29 May 2024 17:44:29 -0700 Subject: [PATCH] Move podman check above docker --- src/librc/librc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librc/librc.c b/src/librc/librc.c index 97445aad9..ba5a4f574 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -306,10 +306,10 @@ detect_container(const char *systype RC_UNUSED) return RC_SYS_RKT; else if (file_regex("/proc/1/environ", "container=systemd-nspawn")) return RC_SYS_SYSTEMD_NSPAWN; - else if (exists("/.dockerenv")) - return RC_SYS_DOCKER; else if (exists("/run/.containerenv")) return RC_SYS_PODMAN; + else if (exists("/.dockerenv")) + return RC_SYS_DOCKER; /* old test, I'm not sure when this was valid. */ else if (file_regex("/proc/1/environ", "container=docker")) return RC_SYS_DOCKER;