Change Docker machine location - Windows

后端 未结 12 1284
执笔经年
执笔经年 2020-12-02 05:08

I am using docker toolbox on Windows 7 to run docker. (docker version 1.9.1)

As it turns out, the docker machine creates its VM at C:\\Users\\username\\.docker\\mach

12条回答
  •  不思量自难忘°
    2020-12-02 05:18

    Simply use the VirtualBox graphic interface to relocate the file disk.vmdk:

    1. Copy file C:\Users\{myUsername}\.docker\machine\machines\default\disk.vmdk into another folder, say F:\docker-image\.
    2. Open VirtualBox, select default VM and open Settings.
    3. Open Storage, select current disk.vmdk and release it (or delete it).
    4. Click on Choose Virtual Hard Disk File... and search for copied file in F:\docker-image\
    5. A Warning occurs: VirtualBox complains of old VM UID then go to menu File, select Virtual Media Manager... and release or remove old disk.vmdk
    6. Retry 4., it's done!
    7. If required by your environment then do the relocation also for boot2docker.iso, Snapshot Folder, Video Capture.

提交回复
热议问题