[英]Unable to run docker compose from WSL 2 Ubuntu
I am trying to run docker-compose up -d --build
from Ubuntu (Windows WSL 2).我正在尝试从 Ubuntu(Windows WSL 2)运行
docker-compose up -d --build
。 I have enabled the WSL integration as per the steps listed here .我已按照此处列出的步骤启用了 WSL 集成。 Docker and compose are working from my Ubuntu terminal as shown in the screenshot below but it gives me the error complaining that "Error response from daemon: path ... is mounted on / but it is not a shared mount".
Docker 和 compose 正在我的 Ubuntu 终端上工作,如下面的屏幕截图所示,但它给了我一个错误,抱怨“来自守护进程的错误响应:路径......已安装在 / 但它不是共享安装”。 How should I resolve this issue?
我应该如何解决这个问题?
Posting this as an answer for easier reading.将此作为答案发布以方便阅读。
As mentioned in the comments, the solution appeared to be removing slashes from volumes as suggested by this similar question and answer :正如评论中提到的,解决方案似乎是按照这个类似的问题和答案的建议从卷中删除斜线:
From this:由此:
volumes:
- ./server/:/usr/src/app/
To this:对此:
volumes:
- ./server:/usr/src/app
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.