Enr*_*que 6 docker docker-compose
如果我运行我的 docker-compose.yml 文件,我总是收到以下错误消息:
docker.credentials.errors.InitializationError: docker-credential-gcloud not installed or not available in PATH
Run Code Online (Sandbox Code Playgroud)
我为想要使用 gcloud 凭据的人找到了很多解决方案。我不想使用它,也不知道它为什么要这样做。我认为这是 docker-compose 的错误配置,因为如果我使用它们的 Dockerfile 单独构建容器,我会启动并运行所有内容。
这是我的 docker-compose.yml:
version: '3'
services:
web:
build: './web'
ports:
- "3000:3000"
search:
build: './search'
ports:
- "3001:3000"
depends_on:
- db
environment:
- MONGO_DB_URI=mongodb://db/microservices
books:
build: './books'
ports:
- "3002:3000"
depends_on:
- db
environment:
- MONGO_DB_URI=mongodb://db/microservices
videos:
build: './videos'
ports:
- "3003:3000"
depends_on:
- db
environment:
- MONGO_DB_URI=mongodb://db/microservices
db:
image: mongo
ports:
- "27017:27017"
nginx:
image: nginx:latest
ports:
- "8080:8080"
volumes:
- ./web/public:/srv/www/static
- ./default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- web
- books
- search
- videos
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1550 次 |
| 最近记录: |