mirror of
https://github.com/docker/docs.git
synced 2026-04-02 09:18:57 +07:00
Image.Mount(): create rw and rootfs directory if they don't exist
This commit is contained in:
@@ -118,6 +118,13 @@ func (image *Image) Mount(root, rw string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// Create the target directories if they don't exist
|
||||
if err := os.Mkdir(root, 0755); err != nil && !os.IsExist(err) {
|
||||
return err
|
||||
}
|
||||
if err := os.Mkdir(rw, 0755); err != nil && !os.IsExist(err) {
|
||||
return err
|
||||
}
|
||||
// FIXME: @creack shouldn't we do this after going over changes?
|
||||
if err := MountAUFS(layers, rw, root); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user