首页 > 其他分享> > docker-compose启动报错Error response from daemon: xxx is mounted on / but it is not a shared mount.
docker-compose启动报错Error response from daemon: xxx is mounted on / but it is not a shared mount.
作者:互联网
今天docker启动时遇到无法启动的情况,苦苦搜索了半天(这里吐槽一下某度真的垃圾),最后通过谷歌找到一个日文链接,得到了解决办法,这里记录一下
host@DESKTOP-H1UNVPM:~/workspace/heating/compose$ docker-compose up -d
[+] Running 6/7
⠿ Network heating_dev_default Created 0.7s
⠿ Container heating_dev_redis_1 Created 0.1s
⠿ Container heating_dev_loki_1 Created 0.1s
⠿ Container heating_dev_nginx_1 Created 0.1s
⠋ Container heating_dev_mqtt-broker_1 Creating 0.1s
⠿ Container heating_dev_prometheus_1 Created 0.1s
⠿ Container heating_dev_mysql_1 Created 0.1s
Error response from daemon: path /home/wjl/workspace/heating/compose/mosquitto/config is mounted on / but it is not a shared mount.
docker-compose.yml里的写法如下
volumes:
- ./mosquitto/config:/mosquitto/config/:ro
问题出在config后面的/
上
解决办法,删掉最后的那个/
volumes:
# - ./mosquitto/config:/mosquitto/config/:ro
- ./mosquitto/config:/mosquitto/config:ro
标签:daemon,compose,Container,0.1,heating,dev,报错,mosquitto,config 来源: https://blog.csdn.net/wujilei5/article/details/120454916