docker-compose up -d 启动服务之后,宿主机 telnet 不通 docker 端口
docker-compose.yml 配置文件如下:
services:
mongo:
image: "mongo:latest"
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=password
growthbook:
image: "growthbook/growthbook:latest"
ports:
- "3000:3000"
- "3100:3100"
depends_on:
- mongo
environment:
- APP_ORIGIN=http://121.199.30.26:3000
- API_HOST=http://121.199.30.26:3100
- MONGODB_URI=mongodb://root:password@mongo:27017/
volumes:
- uploads:/usr/local/src/app/packages/back-end/uploads
volumes:
uploads:
3000 通了,3100不通可能是容器中 3100 对应的服务没有成功启动
谢谢@dudu 大佬指点迷津
iptables 也建议排查下
docker-compose logs -f
看看日志中是不是有错误信息