If I run my docker-compose.yml file I always get the following error message:
docker.credentials.errors.InitializationError: docker-credential-gcloud not installed or not available in PATH
I found a lot of solutions for people that want to use the gcloud credentials. I don't want to use it and don't know why it's asking for that. I think it's a wrong configuration with docker-compose since I get everything up and running, if I build the containers individually with their Dockerfiles.
This is my 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
The gcloud credential helper provides secure, short-lived access to your project resources. It configures Docker to authenticate to Artifact Registry hosts in any environment where the Google Cloud CLI is installed.
You can log into any public or private repository for which you have credentials. When you log in, the command stores credentials in $HOME/. docker/config. json on Linux or %USERPROFILE%/.
Try deleting ~/.docker/config.json
. See here and here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With