Add libvirt to Dockerfile

Grab libvirt and build it statically to use it from an execdriver

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Add libvirt-go to vendors

A libvirt execdriver will need the libvirt-go binding to interact with
libvirt.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Add pkg/rpcfd

This is a small unix-domain-sockets only wrapper around net/rpc
that adds support for passing file descriptors in rpc messages.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
Add .dockersocket directory to init layer

This will be used by the libvirt exec driver to mount in a directory
with the rpc socket, allowing the daemon to interact with the dockerinit

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
Update libcontainer commit dependency

A libvirt execdriver will need to use the newly exported
cgroup file parsing function from libcontainer.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Move some functions from lxc driver to execdriver utils

Some of the internal functions of the LXC driver would be needed for a
Libvirt driver as those two have quite some similar constraints. Moving
them to execdriver/utils.go to help code sharing.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Add libvirt execdriver

Docker-DCO-1.1-Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> (github: jpoimboe)
Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Add dockerinit tag to dynbinary builds

This excludes the libvirt execdriver go files depending on the libvirt
shared library when building dockerinit. Without this, ld can't find
-lvirt when building dockerinit... which will happen for all distros
not shipping the libvirt.a file.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Implement Pause and Unpause in libvirt execdriver

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Create Terminal objects in libvirt execdriver

Without the Terminal object the console couldn't be resized in the
libvirt execdriver.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Make the libvirt rpc socket symlink path secure

Use ioutil.TempDir to make the socket symlink random.

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>
Support for apparmor and selinux in libvirt driver

Signed-off-by: Cédric Bosdonnat <cedric.bosdonnat@free.fr>