There is a resolver (docker_lxc) to retrieve this fact. https://github.com/puppetlabs/facter/blob/4.x/lib/resolvers/docker_lxc.rb