symlink /etc/mtab and /proc/mounts

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
Victor Vieux 2014-03-19 18:52:38 +00:00
parent 47470d299d
commit 07b60d626a
1 changed files with 5 additions and 0 deletions

View File

@ -259,6 +259,7 @@ func SetupInitLayer(initLayer string) error {
"/etc/hosts": "file",
"/etc/hostname": "file",
"/dev/console": "file",
"/etc/mtab": "/proc/mounts",
// "var/run": "dir",
// "var/lock": "dir",
} {
@ -285,6 +286,10 @@ func SetupInitLayer(initLayer string) error {
return err
}
f.Close()
default:
if err := os.Symlink(typ, path.Join(initLayer, pth)); err != nil {
return err
}
}
} else {
return err