如何在Docker中共享安装?
我正在尝试在 Windows 10 中的 Docker(直接来自 Debian 发行版)中启动一个项目并收到此错误:
$ docker compose up -d
[+] Running 0/0
? Container core_php74_1 Creating 0.0s
Error response from daemon: path /home/me/path/to/project is mounted on / but it is not a shared mount.
如何使挂载路径/home/me/path/to/project成为共享挂载?
回答
将桌面版 docker 更新到 3.5.2 (66501) 后,我遇到了同样的错误。我在我的docker-compose.yml. 我删除了它们以解决问题。
改变
volumes:
- ./:/app/
- ./another/folder:/folder/
到
volumes:
- ./:/app
- ./another/folder:/folder