Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud auth login with Docker does not work as it says in documentation

I've followed the Docker instructions from here exactly: https://cloud.google.com/sdk/#install-docker (click Alternative Methods to find Docker instructions).

But when I run:

docker run -t -i --volumes-from gcloud-config google/cloud-sdk gcloud compute instances list

I get:

docker run -t -i --volumes-from gcloud-config google/cloud-sdk gcloud compute instances list
ERROR: (gcloud.compute.instances.list) You do not currently have an active account selected.
Please run:

  $ gcloud auth login

to obtain new credentials, or if you have already logged in with a
different account:

  $ gcloud config set account <account name>

to select an already authenticated account to use.

It doesn't look like it's picking up that I already authenticated. Any ideas?

like image 446
Travis Reeder Avatar asked Sep 14 '25 05:09

Travis Reeder


1 Answers

The link doesn't point to anything about Docker, could you give correct link.

The encountered error output is pointing you to follow the two-step Google verification. If you provide :

gcloud auth login

command, the verification process will start, and then you will be able to manipulate your Google CLoud project

However this page [1] could guide you installing Docker on Google Cloud.

[1] - http://docs.docker.com/installation/google/

like image 193
Marco Avatar answered Sep 15 '25 21:09

Marco