在Windows 10 Pro上更改Docker本机映像的位置 [英] Change Docker native images location on Windows 10 Pro
问题描述
这不是重复的
在Windows上,Docker本机运行在Hyper中-V虚拟机。
移动现有的Docker VM
我必须将docker使用的VM移至理想位置。
我使用 Hyper-V manager 的GUI进行了此操作。
用于docker的VM称为 MobyLinuxVM 。
- 右键单击 MobyLinuxVM
- 选择移动
- 选择所需位置
设置期货Hyper-V VM的位置
为确保Hyper-V期货VM将存储在我的辅助驱动器上,
我遵循了这些说明
在powershell终端中(目标文件夹必须存在)
SET-VMHOST –计算机名<计算机> –virtualharddiskpath‘D:\Hyper-V_Virtual-Hard_Disks’
SET-VMHOST –computername< computer> –virtualmachinepath‘D:\Hyper-V_VMs’
This is not a duplicate of Change Docker machine location - Windows
I'm using docker native, version 1.12.1-stable (build: 7135) on Windows 10 Pro with Hyper-V enabled. So docker is not running with VirtualBox nor do I have the folder C:\Users\username\.docker
I'd like to move docker's images, caches, ... to my secondary drive D:\
I guess I should edit the Docker Daemon configuration.
I tried to add "graph": "/D/docker"
. Docker started correctly but I couldn't pull any image because of an error
open /D/docker/tmp/GetImageBlob135686954: no such file or directory
How to tell docker to use another path to store its images, etc ?
I found a solution here
Docker native, on Windows, runs in a Hyper-V virtual machine.
Move existing docker VM
I have to move the VM used by docker to the desired location. I did this using the GUI of Hyper-V manager. The VM for docker is called MobyLinuxVM.
- Right-click MobyLinuxVM
- Select Move
- Select desired location
Set location of futures Hyper-V VMs
And to be sure futures VMs of Hyper-V will be stored on my secondary drive, I followed those instructions
In a powershell terminal (destination folders must exist)
SET-VMHOST –computername <computer> –virtualharddiskpath 'D:\Hyper-V_Virtual-Hard_Disks'
SET-VMHOST –computername <computer> –virtualmachinepath 'D:\Hyper-V_VMs'
这篇关于在Windows 10 Pro上更改Docker本机映像的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!