gpt4 book ai didi

docker - 添加 D : Drive to Windows Server 2016 Docker Images

转载 作者:行者123 更新时间:2023-12-02 01:05:54 25 4
gpt4 key购买 nike

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

最佳答案

我们让它发挥作用了。本质上,我们在注册表中添加了一个符号链接(symbolic link)。

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

关于docker - 添加 D : Drive to Windows Server 2016 Docker Images,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40225407/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com