Make nsinit a proper go pkg and add the main in another dir
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
52fa4de610
commit
5d71533d4e
7 changed files with 20 additions and 12 deletions
|
@ -1,6 +1,6 @@
|
|||
// +build linux
|
||||
|
||||
package main
|
||||
package nsinit
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -15,7 +15,9 @@ import (
|
|||
"syscall"
|
||||
)
|
||||
|
||||
func initCommand(container *libcontainer.Container, console string, pipe io.ReadCloser, args []string) error {
|
||||
// Init is the init process that first runs inside a new namespace to setup mounts, users, networking,
|
||||
// and other options required for the new container.
|
||||
func Init(container *libcontainer.Container, console string, pipe io.ReadCloser, args []string) error {
|
||||
rootfs, err := resolveRootfs()
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue