Remove SysinitPath from process
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
f846ecdc77
commit
1e81387edc
3 changed files with 23 additions and 24 deletions
23
container.go
23
container.go
|
@ -675,18 +675,17 @@ func (container *Container) Start() (err error) {
|
|||
}
|
||||
|
||||
container.process = &execdriver.Process{
|
||||
ID: container.ID,
|
||||
Privileged: container.hostConfig.Privileged,
|
||||
Rootfs: root,
|
||||
InitPath: "/.dockerinit",
|
||||
Entrypoint: container.Path,
|
||||
Arguments: container.Args,
|
||||
WorkingDir: workingDir,
|
||||
ConfigPath: container.lxcConfigPath(),
|
||||
Network: en,
|
||||
Tty: container.Config.Tty,
|
||||
User: container.Config.User,
|
||||
SysInitPath: runtime.sysInitPath,
|
||||
ID: container.ID,
|
||||
Privileged: container.hostConfig.Privileged,
|
||||
Rootfs: root,
|
||||
InitPath: "/.dockerinit",
|
||||
Entrypoint: container.Path,
|
||||
Arguments: container.Args,
|
||||
WorkingDir: workingDir,
|
||||
ConfigPath: container.lxcConfigPath(),
|
||||
Network: en,
|
||||
Tty: container.Config.Tty,
|
||||
User: container.Config.User,
|
||||
}
|
||||
container.process.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
|
||||
|
||||
|
|
|
@ -29,18 +29,17 @@ type Network struct {
|
|||
type Process struct {
|
||||
exec.Cmd
|
||||
|
||||
ID string
|
||||
Privileged bool
|
||||
User string
|
||||
Rootfs string // root fs of the container
|
||||
InitPath string // dockerinit
|
||||
Entrypoint string
|
||||
Arguments []string
|
||||
WorkingDir string
|
||||
ConfigPath string
|
||||
Tty bool
|
||||
Network *Network // if network is nil then networking is disabled
|
||||
SysInitPath string
|
||||
ID string
|
||||
Privileged bool
|
||||
User string
|
||||
Rootfs string // root fs of the container
|
||||
InitPath string // dockerinit
|
||||
Entrypoint string
|
||||
Arguments []string
|
||||
WorkingDir string
|
||||
ConfigPath string
|
||||
Tty bool
|
||||
Network *Network // if network is nil then networking is disabled
|
||||
}
|
||||
|
||||
func (c *Process) Pid() int {
|
||||
|
|
|
@ -256,6 +256,7 @@ func linkLxcStart(root string) error {
|
|||
return os.Symlink(sourcePath, targetPath)
|
||||
}
|
||||
|
||||
// TODO: This can be moved to the mountinfo reader in the mount pkg
|
||||
func rootIsShared() bool {
|
||||
if data, err := ioutil.ReadFile("/proc/self/mountinfo"); err == nil {
|
||||
for _, line := range strings.Split(string(data), "\n") {
|
||||
|
|
Loading…
Reference in a new issue