[systemd-devel] [PATCH 1/4] virt: detect that we are running inside the docker container

Michal Sekletar msekleta at redhat.com
Thu Oct 2 00:57:41 PDT 2014


---
 src/shared/virt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/shared/virt.c b/src/shared/virt.c
index b436895..f9c4e67 100644
--- a/src/shared/virt.c
+++ b/src/shared/virt.c
@@ -310,6 +310,8 @@ int detect_container(const char **id) {
                 _id = "lxc-libvirt";
         else if (streq(e, "systemd-nspawn"))
                 _id = "systemd-nspawn";
+        else if (streq(e, "docker"))
+                _id = "docker";
         else
                 _id = "other";
 
-- 
2.0.1



More information about the systemd-devel mailing list