Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker-Compose asking for gcloud credentials

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

like image 987
Enrique Avatar asked May 21 '20 11:05

Enrique


People also ask

What does Gcloud Auth configure Docker do?

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.

Where are Docker registry credentials stored?

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%/.


1 Answers

Try deleting ~/.docker/config.json. See here and here.

like image 110
svakili Avatar answered Oct 05 '22 16:10

svakili