-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win10下部署报错:Operation not permitted, terminating #7
Comments
提供下
我们看看是否可以复现。 |
@DuanPengfei 使用的Windows 版本 Docker,貌似是因为Mongodb 不支持直接映射,只能使用具名volume
|
windows下只能使用volume,不能直接bind磁盘。
docker volume create mongodata
docker volume create redisdata
docker volume create logsdata
version: "3.3"
services:
mongodb:
image: mongo:3.4
volumes:
- type: volume
source: mongodata
target: /data/db
redis:
image: redis:4.0.6
command: redis-server --appendonly yes
volumes:
- type: volume
source: redisdata
target: /data
web:
image: easymock/easymock:1.5.1
command: /bin/bash -c "npm start"
links:
- mongodb:mongodb
ports:
- 7300:7300
volumes:
- type: volume
source: logsdata # 日志地址,根据需要修改为本地地址
target: /home/easy-mock/easy-mock/logs
- type: bind
source: ./production.json # 配置地址,请使用本地配置地址替换
target: /home/easy-mock/easy-mock/config/production.json
# 一定要声明volumes
volumes:
mongodata:
external:
name: mongodata
redisdata:
external:
name: redisdata
logsdata:
external:
name: logsdata
|
@CoinXu 感觉可以提个 PR 直接升级下原项目的 docker-compose 了,这样就可以尽最大可能兼容各种场景,让大家真正做到开箱即用😄 |
The text was updated successfully, but these errors were encountered: