Skip to content

thebergamo/cloud-sdk-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloud-sdk-docker

google/cloud-sdk is a Docker image bundling all the components and dependencies of the Google Cloud SDK:

  • App Engine SDK for Go
  • App Engine SDK for Java
  • App Engine SDK for Python and PHP
  • Big Query Command Line Tool
  • Cloud DNS Admin Command Line Interface
  • Cloud SQL Admin Command Line Interface
  • Cloud Storage Command Line Tool
  • Compute Engine Command Line Tool

Usage

Follow these instructions if you are running docker outside of Google Compute Engine:

# get the cloud sdk image
$ docker pull google/cloud-sdk

# auth & save the credentials in gcloud-config volumes
$ docker run -t -i --name gcloud-config google/cloud-sdk gcloud auth login
Go to the following link in your browser: ...
Enter verification code: ...
You are now logged in as [...]
Your current project is [None]. You can change this setting by running:
   $ gcloud config set project <project>
gcloud config set project ...

# re-use the credentials from gcloud-config volumes & run sdk commands
$ docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcutil listinstances
$ docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gsutil ls
$ docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcloud components list
$ docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcloud version

If you are using this image from within Google Compute Engine. If you enable a Service Account with the necessary scopes, there is no need to auth or use a config volume:

# get the cloud sdk image
$ docker pull google/cloud-sdk

# just start using the sdk commands
$ docker run --rm -ti google/cloud-sdk gcutil listinstances
$ docker run --rm -ti google/cloud-sdk gsutil ls
$ docker run --rm -ti google/cloud-sdk gcloud components list
$ docker run --rm -ti google/cloud-sdk gcloud version

About

Docker image with all the components of the Google Cloud SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%