mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #4779 from vieux/symlink_mtab
symlink /etc/mtab and /proc/mounts
This commit is contained in:
commit
b5caa5053a
1 changed files with 5 additions and 0 deletions
|
@ -259,6 +259,7 @@ func SetupInitLayer(initLayer string) error {
|
||||||
"/etc/hosts": "file",
|
"/etc/hosts": "file",
|
||||||
"/etc/hostname": "file",
|
"/etc/hostname": "file",
|
||||||
"/dev/console": "file",
|
"/dev/console": "file",
|
||||||
|
"/etc/mtab": "/proc/mounts",
|
||||||
// "var/run": "dir",
|
// "var/run": "dir",
|
||||||
// "var/lock": "dir",
|
// "var/lock": "dir",
|
||||||
} {
|
} {
|
||||||
|
@ -285,6 +286,10 @@ func SetupInitLayer(initLayer string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
f.Close()
|
f.Close()
|
||||||
|
default:
|
||||||
|
if err := os.Symlink(typ, path.Join(initLayer, pth)); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Add table
Reference in a new issue