我是docker的初学者,尝试使用creator的更新bash子系统在我的Windows 10计算机上运行它。我的dockerfile在我的mac上运行正常,但是当我在Windows上的同一个文件中尝试docker build
时,我会收到如下错误:
time="2017-08-28T14:44:36-07:00" level=error
msg="Can't add file \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon
to tar: readlink \\\\?\\C:\\Users\\username\\Workspace\\...\\node_modules\\.bin\\nodemon:
The system cannot find the file specified."
打印出所有node_modules依赖项。我的第一个问题是:是什么触发了这个"添加"所有node_modules的操作?在我的dockerfile的第一行执行之前打印出这些错误消息
Step 1/25 : FROM ubuntu:14.04
其次,这个问题是否与Windows中的不同路径有关?对我来说,关于错误的最奇怪的部分是奇怪的路径\\\\?\\C:\\Users\\username
。这里有多少斜线和路径中的问号?
注意:我已尝试设置Docker Toolbox并运行quickstart终端。运行quickstart终端时出现以下错误
Error with pre-create check:
"This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V hypervisor. (To skip this check, use --virtualbox-no-vtx-check)"
Looks like something went wrong in step ´Checking if machine default exists
´... Press any key to continue...
所以我尝试确保通过本文here启用hyper-v
注2:我还确保我的C盘与我的容器共享