将D:Drive添加到Windows Server 2016 Docker映像

如何将D:驱动器添加到Microsoft / windowsservercore基础映像? 我的Windows Server 2016服务器有一个D:驱动器。 该服务器是一个AWS实例。 这是与本机的Docker安装,而不是“Docker for Windows”已经有一段时间了。

我们得到它的工作。 本质上,我们正在registry中添加一个符号链接。

将其添加到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;