[英]Volume name issue with docker-compose on windows
我正在尝试使用 docker-compose 为 codeceptjs 启动一个多容器应用程序。 在 linux 上,docker 撰写 yml 文件工作正常,但在 windows 上,它无法抱怨“卷名太短”。 为什么 docker 撰写抱怨 Windows?
这是 yml 文件内容:
version: '3.7'
services:
hub:
image: selenium/hub:latest
[...]
chrome:
image: selenium/node-chrome:latest
volumes:
- /dev/shm:/dev/shm
environment:
[...]
networks:
test_network:
ipv4_address: 10.2.0.3
test-acceptance:
image: test/codeceptjs
[...]
volumes:
- $WORKSPACE:/tests
- node_modules:/node_modules
networks:
test_network:
ipv4_address: 10.2.0.5
volumes:
node_modules:
networks:
test_network:
driver: bridge
ipam:
driver: default
config:
-
subnet: 10.2.0.0/24
X
也许这只是一个错字,但有问题的值可能在这里:
volumes:
node_modules:
你需要在冒号后面放一些东西。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.