-
Notifications
You must be signed in to change notification settings - Fork 130
启动报错 #37
Comments
找一下你的bash文件在哪里 |
因为已经有其他mongo的服务了 我是改了service的名字和端口了的 按理说应该不会影响吧
bash文件路径改了也不行 去掉了直接执行/wait-for-it.sh dmongo:37017 -- entrypoint.sh也有问题 |
端口还是27017,容器内部组了内网,通过它自己的内网还是27017。 version: '2.1'
services:
yapi:
image: mrjin/yapi:latest
# build: ./
container_name: yapi
environment:
- VERSION=1.10.2
- LOG_PATH=/tmp/yapi.log
- HOME=/home
- PORT=3000
- ADMIN_EMAIL=test@test.com
- DB_SERVER=dmongo
- DB_NAME=yapi
- - DB_PORT=37017
+ - DB_PORT=27017
# restart: always
ports:
- 127.0.0.1:3000:3000
volumes:
- /a_dev/dev_yapi/log/yapi.log:/home/vendors/log # log dir
depends_on:
- brmongo
- entrypoint: "bash /wait-for-it.sh dmongo:37017 -- entrypoint.sh"
+ entrypoint: "bash /wait-for-it.sh dmongo:27017 -- entrypoint.sh"
networks:
- back-net
dmongo:
image: mongo
container_name: dmongo
# restart: always
ports:
- 127.0.0.1:37017:27017
volumes:
- /a_dev/dev_yapi/mongodb:/data/db #db dir
networks:
- back-net
networks:
back-net:
external: true |
Error: container_linux.go:367: starting container process caused: exec: "bash /wait-for-it.sh dmongo:27017 -- entrypoint.sh": stat bash /wait-for-it.sh dmongo:27017 -- entrypoint.sh: no such file or directory: OCI not found |
@u5de6 宿主机配置信息发一下 |
Aliyun的系统 用的podman执行 |
|
尝试一下你本地重新构建镜像 删掉mrjin/yapi:latest镜像。 再修改 - image: mrjin/yapi:latest
+ # image: mrjin/yapi:latest
- # build: ./
+ build: ./ |
还是一样的错误 我打印了bash的路径 根目录的文件 |
我注释了这行就可以了 想问下这个脚本的逻辑是检测mongo的服务是否正常是吧 - entrypoint: "bash /wait-for-it.sh dmongo:27017 -- entrypoint.sh"
+ # entrypoint: "bash /wait-for-it.sh dmongo:27017 -- entrypoint.sh" |
是的。如果mongo没问题,可以把 镜像删除,拉取一下最新的镜像,再次尝试 |
好的👌🏻 |
用的是最新的镜像 ”Last pushed 19 hours ago by mrjin“
Error: container_linux.go:367: starting container process caused: exec: "bash /wait-for-it.sh mongo:27017 -- entrypoint.sh": stat bash /wait-for-it.sh mongo:27017 -- entrypoint.sh: no such file or directory: OCI not found
The text was updated successfully, but these errors were encountered: