зеркало из https://github.com/microsoft/docker.git
Fix spurious mtab symlink error when /etc doesn't exist yet
symlink /proc/mounts /var/lib/docker/btrfs/subvolumes/1763d6602b8b871f0a79754f1cb0a31b3928bb95de5232b1b8c15c60fa1017f6-init/etc/mtab: no such file or directory Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
This commit is contained in:
Родитель
e128a606e3
Коммит
3d9cd1e5f1
|
@ -272,15 +272,15 @@ func SetupInitLayer(initLayer string) error {
|
|||
|
||||
if _, err := os.Stat(path.Join(initLayer, pth)); err != nil {
|
||||
if os.IsNotExist(err) {
|
||||
if err := os.MkdirAll(path.Join(initLayer, path.Dir(pth)), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
switch typ {
|
||||
case "dir":
|
||||
if err := os.MkdirAll(path.Join(initLayer, pth), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
case "file":
|
||||
if err := os.MkdirAll(path.Join(initLayer, path.Dir(pth)), 0755); err != nil {
|
||||
return err
|
||||
}
|
||||
f, err := os.OpenFile(path.Join(initLayer, pth), os.O_CREATE, 0755)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Загрузка…
Ссылка в новой задаче