diff options
Diffstat (limited to 'src/librc/librc.c')
-rw-r--r-- | src/librc/librc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librc/librc.c b/src/librc/librc.c index 3e1f0d83..fdde3d5a 100644 --- a/src/librc/librc.c +++ b/src/librc/librc.c @@ -285,6 +285,9 @@ detect_container(const char *systype) 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; + /* old test, I'm not sure when this was valid. */ else if (file_regex("/proc/1/environ", "container=docker")) return RC_SYS_DOCKER; #endif |