mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00

Replaced github.com/docker/libcontainer with github.com/opencontainers/runc/libcontaier. Also I moved AppArmor profile generation to docker. Main idea of this update is to fix mounting cgroups inside containers. After updating docker on CI we can even remove dind. Signed-off-by: Alexander Morozov <lk4d4@docker.com>
22 lines
388 B
Go
22 lines
388 B
Go
// +build linux
|
|
|
|
package lxc
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/opencontainers/runc/libcontainer/utils"
|
|
)
|
|
|
|
func finalizeNamespace(args *InitArgs) error {
|
|
if err := utils.CloseExecFrom(3); err != nil {
|
|
return err
|
|
}
|
|
if err := setupUser(args.User); err != nil {
|
|
return fmt.Errorf("setup user %s", err)
|
|
}
|
|
if err := setupWorkingDirectory(args); err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|