DOClever 在win docker-compose up -d 后无法访问 localhost:10000
具体遇到的问题
在 cenOS 上配置的 DOClever 可以打开
win10 同样的配置无法访问 localhost:10000
win DOClever logs 日志看着和cenOS上面也相同,不知道在win10上面为什么就是访问不了 localhost:1000
粘贴全部相关代码,切记添加代码注释(请勿截图)
cenOS—>docker-compose.yml
version: "2"
services:
DOClever:
image: lw96/doclever
restart: always
container_name: "DOClever"
ports:
- 10000:10000
volumes:
- /srv/doclever/file:/root/DOClever/data/file
- /srv/doclever/img:/root/DOClever/data/img
- /srv/doclever/tmp:/root/DOClever/data/tmp
environment:
- DB_HOST=mongodb://mongo:27017/DOClever
- PORT=10000
links:
- mongo:mongo
mongo:
image: mongo:latest
restart: always
container_name: "mongodb"
volumes:
- /srv/doclever/db:/data/db
win10—>docker-compose.yml
version: "2"
services:
DOClever:
image: lw96/doclever
restart: always
container_name: "DOClever"
ports:
- 10000:10000
volumes:
- E:/learn/doclever/file:/root/DOClever/data/file
- E:/learn/doclever/img:/root/DOClever/data/img
- E:/learn/doclever/tmp:/root/DOClever/data/tmp
environment:
- DB_HOST=mongodb://mongo:27017/DOClever
- PORT=10000
links:
- mongo:mongo
mongo:
image: mongo:latest
restart: always
container_name: "mongodb"
volumes:
- E:/learn/doclever/db:/data/db
cenOS DOClever logs(部分log)
BASH_COMMAND is: --db mongodb://mongo:27017/DOClever --file /root/DOClever/data/file --img /root/DOClever/data/img --temp /root/DOClever/data/tmp --port 10000 --https false
2020-11-08 11:15:35,788 CRIT Supervisor running as root (no user in config file)
2020-11-08 11:15:35,801 INFO RPC interface 'supervisor' initialized
2020-11-08 11:15:35,801 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-11-08 11:15:35,802 INFO supervisord started with pid 8
2020-11-08 11:15:36,804 INFO spawned: 'DOClever' with pid 11
2020-11-08 11:15:37,809 INFO success: DOClever entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
BASH_COMMAND is: --db mongodb://mongo:27017/DOClever --file /root/DOClever/data/file --img /root/DOClever/data/img --temp /root/DOClever/data/tmp --port 10000 --https false
2020-11-08 16:43:41,608 CRIT Supervisor running as root (no user in config file)
Unlinking stale socket /tmp/supervisor.sock
2020-11-08 16:43:41,989 INFO RPC interface 'supervisor' initialized
2020-11-08 16:43:41,989 CRIT Server 'unix_http_server' running without any HTTP authentication checking
win10 DOClever logs(全部log)
BASH_COMMAND is: --db mongodb://mongo:27017/DOClever --file /root/DOClever/data/file --img /root/DOClever/data/img --temp /root/DOClever/data/tmp --port 10000 --https false
2020-11-19 02:01:12,312 CRIT Supervisor running as root (no user in config file)
2020-11-19 02:01:12,317 INFO RPC interface 'supervisor' initialized
2020-11-19 02:01:12,317 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2020-11-19 02:01:12,317 INFO supervisord started with pid 8
2020-11-19 02:01:13,320 INFO spawned: 'DOClever' with pid 11
2020-11-19 02:01:15,027 INFO success: DOClever entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
24
收起
正在回答
1回答
你可以docker restart下DOClever容器
从上面的日志来看,应该是正常启动了
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星