Merge pull request #4953 from rhatdan/selinux

These two patches should fix problems we see with running docker in the wild.
This commit is contained in:
Victor Vieux 2014-04-02 16:36:41 -07:00
commit 23f80b4d97
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ func (ns *linuxNs) Init(container *libcontainer.Container, uncleanRootfs, consol
if err := setupNetwork(container, context); err != nil { if err := setupNetwork(container, context); err != nil {
return fmt.Errorf("setup networking %s", err) return fmt.Errorf("setup networking %s", err)
} }
label.Init()
ns.logger.Println("setup mount namespace") ns.logger.Println("setup mount namespace")
if err := setupNewMountNamespace(rootfs, container.Mounts, console, container.ReadonlyFs, container.NoPivotRoot, container.Context["mount_label"]); err != nil { if err := setupNewMountNamespace(rootfs, container.Mounts, console, container.ReadonlyFs, container.NoPivotRoot, container.Context["mount_label"]); err != nil {
return fmt.Errorf("setup mount namespace %s", err) return fmt.Errorf("setup mount namespace %s", err)