我正在尝试组成mongodb容器,但出现错误
启动v2_mongodb ...完成
启动rockmongo_v2 ...完成
附加到v2_mongodb,rockmongo_v2
v2_mongodb |开始蒙哥...
v2_mongodb退出,代码为100
这是docker-compose.yml文件的内容和docker ps的输出
version: '2'
services:
v2_db:
image: sameersbn/mongodb:latest
container_name: "v2_mongodb"
ports:
- "27017:27017"
volumes:
- ./data/db:/data/db:rw
- ./data/db:/var/lib/mongodb:rw
environment:
- MONGO_DATA_DIR=/data/db
command: mongod --verbose --smallfiles --dbpath=/data/db # --quiet
rockmongo_v2:
image: javierjeronimo/rockmongo:latest
container_name: "rockmongo_v2"
ports:
- "27118:80"
links:
- v2_db:mongo
depends_on:
- v2_db
docker ps输出
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
94794d6f3ff1 javierjeronimo/rockmongo:latest "/bin/sh -c 'service…" 38 minutes ago Up About a minute 0.0.0.0:27118->80/tcp rockmongo_v2
bd4ed92796db sameersbn/mongodb:latest "/sbin/entrypoint.sh…" 38 minutes ago Exited (100) About a minute ago v2_mongodb
我不知道上述错误的可能原因是什么?
答案 0 :(得分:0)
列出您的音量链接: docker卷ls
删除卷:(以我为例,释放了约29.35 Gig) docker卷修剪