将D:驱动器添加到Windows Server 2016 Docker映像
如何将D:驱动器添加到microsoft/windowsservercore基本映像? 我的Windows Server 2016服务器有一个D:驱动器。服务器是一个AWS实例。将D:驱动器添加到Windows Server 2016 Docker映像,docker,windows-server-2016,Docker,Windows Server 2016,如何将D:驱动器添加到microsoft/windowsservercore基本映像? 我的Windows Server 2016服务器有一个D:驱动器。服务器是一个AWS实例。 这是安装了本机Docker,而不是已有一段时间的“Windows Docker”。我们让它开始工作。本质上,我们在注册表中添加了一个符号链接 将其添加到dockerfile: RUN powershell -NoProfile -Command \ New-Item -ItemType directory -P
这是安装了本机Docker,而不是已有一段时间的“Windows Docker”。我们让它开始工作。本质上,我们在注册表中添加了一个符号链接 将其添加到dockerfile:
RUN powershell -NoProfile -Command \
New-Item -ItemType directory -Path C:\drived ; \
New-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'D:' -Value '\??\C:\drived' -PropertyType String;
我使用subst命令执行此操作:
mkdir c:\drived
subst d: c:\drived
我认为这样的驱动器只在当前会话中可见,因此如果使用Windows服务,它将无法工作