我该如何向 microsoft/windowsservercore 基础镜像添加 D: 盘?
我的 Windows Server 2016 服务器有一个 D: 盘。该服务器是 AWS 实例。
这是使用本地 Docker 安装的,而不是已经存在一段时间的“Docker for Windows”。
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;
。
mkdir c:\drived
subst d: c:\drived