gpt4 book ai didi

docker - 使用 Docker for windows 将 windows 驱动器卷挂载到 Linux 容器中

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

我正在使用 Docker for windows,我想在 Linux 容器中找到 Docker 创建卷的位置?

有没有人能够执行我想要实现的卷安装?

最佳答案

如果您只是想将 Windows 路径挂载到基于 Linux 的容器,这里有一个使用基本 docker run 的示例。命令:

docker run -d --name qbittorrent -v "/f/Fetched Media/Unsorted":/downloads -v "/f/Fetched Media/Blackhole":/blackhole linuxserver/qbittorrent
此示例共享 f:\Fetched Media\Unsortedf:\Fetched Media\Blackhole Windows 主机上的文件夹到容器,在 Linux 容器中,您会在冒号右侧显示的相应 Linux 路径中看到这些 Windows 文件夹中的文件。
f:\Fetched Media\Unsorted文件夹将位于 /downloads Linux 容器中的文件夹。
*首先,请确保您已在 GUI 的 Docker 桌面设置区域中共享了这些 Windows 文件夹。
WSL(2) 的更新:
您不需要专门共享 Windows 文件夹路径;仅在不使用 WSL 时才需要。

关于docker - 使用 Docker for windows 将 windows 驱动器卷挂载到 Linux 容器中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60916317/

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