There is a resolver (docker_lxc) to retrieve this fact. https://github.com/puppetlabs/facter/blob/4.x/lib/resolvers/docker_lxc.rb
The resolver should be called with :hypervisor and check if the result is a hash that has the key 'lxc'