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 committed May 30, 2024
1 parent ce60b5b commit 7f826da
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 @@ -304,10 +304,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 7f826da

Please sign in to comment.