Skip to content

Commit

Permalink
Move podman check above docker
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylviettee authored and navi-desu committed Jul 25, 2024
1 parent b94dc7d commit 089c473
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librc/librc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 089c473

Please sign in to comment.