puppetlabs/facter — pull request #563 by jamtur01 (2013-11-28 16:19:39+00:00)
Title:   Fixes #23314 - Add Docker to virtual facts

Adds support to the virtual facts to detect if Facter is running inside a Docker container.

It uses the /proc/self/environ file and checks for the string:

container=lxc-docker

See http://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/ for more details of this.

See related PR in Docker - https://github.com/dotcloud/docker/pull/2939