gpt4 book ai didi

windows - docker-compose 错误无法启动服务 mongo : driver failed programming external connectivity on endpoint

转载 作者:行者123 更新时间:2023-12-02 18:19:58 34 4
gpt4 key购买 nike

我正在使用 docker compose 在 docker 中使用 mondodb 设置 Grandnode。

docker-compose.yml

    version: "3.6"

services:
mongo:
image: mongo:3.6
volumes:
- mongo_data_db:/data/db
- mongo_data_configdb:/data/configdb
ports:
- 27017:27017
grandnode:
image: grandnode/grandnode:4.10
ports:
- 8080:8080
depends_on:
- mongo

volumes:
mongo_data_db:
external: true
mongo_data_configdb:
external: true

使用 docker-compose 时出现以下错误。
E:\docker\grandnode>docker-compose up
Creating network "grandnode_default" with the default driver
Creating grandnode_mongo_1 ... error

ERROR: for grandnode_mongo_1 Cannot start service mongo: driver failed programming external connectivity on endpoint grandnode_mongo_1 (1e54342c07b093e32189aad487927f226b3ed0d1b6bdf7413588377b0e99bc2c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.20.0.2:27017: input/output error

ERROR: for mongo Cannot start service mongo: driver failed programming external connectivity on endpoint grandnode_mongo_1 (1e54342c07b093e32189aad487927f226b3ed0d1b6bdf7413588377b0e99bc2c): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:27017:tcp:172.20.0.2:27017: input/output error
ERROR: Encountered errors while bringing up the project.

最佳答案

除非您想从本地主机连接到 MongoDB 实例,否则不需要端口映射“27017:27017”。
这两个服务都在同一个网络上,无论如何都会看到对方。 Grandnode 可以在 mongo:27017 连接到 MongoDB

关于windows - docker-compose 错误无法启动服务 mongo : driver failed programming external connectivity on endpoint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55887414/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com