首页 > 解决方案 > Docker Compose 构建失败 - 文件共享已被取消

问题描述

我遇到了 Docker Desktop 的问题,目前我在 Stackoverflow 上以用户身份运行边缘版本。在我得到驱动器因未知原因未共享错误之前,该错误已通过安装边缘版本“解决”:适用于 Windows 的 Docker:驱动器共享因未知原因失败

现在已经安装了这个,我得到了这个新的错误,它阻止了一些容器的构建。这些容器都已经过测试,可以在其他几个系统上运行。目前 4 个容器中有 3 个未构建,它们都产生如下相同的错误:

ERROR: for db  Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
Encountered errors while bringing up the project.

完整错误:

Creating imt2291-part2_www_1 ...
Creating imt2291-part2_phpmyadmin_1 ... done
Creating imt2291-part2_db_1         ...
Creating imt2291-part2_test_1       ... error
Creating imt2291-part2_www_1        ... error
ERROR: for imt2291-part2_test_1  Cannot create container for service test: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}

ERROR: for imt2291-part2_www_1  Cannot create container for service www: status Creating imt2291-part2_db_1         ... error
lled"}

ERROR: for imt2291-part2_db_1  Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}

ERROR: for test  Cannot create container for service test: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}

ERROR: for www  Cannot create container for service www: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}

ERROR: for db  Cannot create container for service db: status code not OK but 500: {"Message":"Unhandled exception: Filesharing has been cancelled"}
Encountered errors while bringing up the project.

有没有人遇到过这个问题并找到了解决方法?

标签: windowsdockerdocker-composedocker-desktop

解决方案


您需要在 Docker for Windows 应用程序中更新文件共享配置(2.2.0.0 中有一个新的安全强化,具有激进的默认值)。添加您需要的所有文件夹,然后重新启动 Docker for Windows。

例子


推荐阅读