github.com/dougm/docker@v1.5.0/daemon/execdriver/lxc/lxc_init_linux.go (about) 1 package lxc 2 3 import ( 4 "fmt" 5 6 "github.com/docker/libcontainer" 7 "github.com/docker/libcontainer/namespaces" 8 "github.com/docker/libcontainer/utils" 9 ) 10 11 func finalizeNamespace(args *InitArgs) error { 12 if err := utils.CloseExecFrom(3); err != nil { 13 return err 14 } 15 if err := namespaces.SetupUser(&libcontainer.Config{ 16 User: args.User, 17 }); err != nil { 18 return fmt.Errorf("setup user %s", err) 19 } 20 if err := setupWorkingDirectory(args); err != nil { 21 return err 22 } 23 return nil 24 }