Always symlink /dev/ptmx for libcontainer
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
This commit is contained in:
parent
87b153606a
commit
935520b224
1 changed files with 6 additions and 6 deletions
|
@ -46,11 +46,9 @@ func setupNewMountNamespace(rootfs, console string, readonly, noPivotRoot bool)
|
||||||
if err := setupDev(rootfs); err != nil {
|
if err := setupDev(rootfs); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if console != "" {
|
|
||||||
if err := setupPtmx(rootfs, console); err != nil {
|
if err := setupPtmx(rootfs, console); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if err := system.Chdir(rootfs); err != nil {
|
if err := system.Chdir(rootfs); err != nil {
|
||||||
return fmt.Errorf("chdir into %s %s", rootfs, err)
|
return fmt.Errorf("chdir into %s %s", rootfs, err)
|
||||||
}
|
}
|
||||||
|
@ -245,9 +243,11 @@ func setupPtmx(rootfs, console string) error {
|
||||||
if err := os.Symlink("pts/ptmx", ptmx); err != nil {
|
if err := os.Symlink("pts/ptmx", ptmx); err != nil {
|
||||||
return fmt.Errorf("symlink dev ptmx %s", err)
|
return fmt.Errorf("symlink dev ptmx %s", err)
|
||||||
}
|
}
|
||||||
|
if console != "" {
|
||||||
if err := setupConsole(rootfs, console); err != nil {
|
if err := setupConsole(rootfs, console); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue