Skip to content
This repository was archived by the owner on Jun 16, 2020. It is now read-only.

un-cloud-builder for decoding a gcloud service key & activating a gcloud account, to be shared with other docker container instances.

Notifications You must be signed in to change notification settings

UnspecifiedLLC/gcloud-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Activate a service account for gcloud. The volumes from this container can be used in subsequent cloud-builders to use this activated account. Usage:

  1. Define an environment variable GCLOUD_SERVICE_KEY that holds the service account key; this should be base64 encoded, and it should be SECRET!

  2. Create a volume to be shared between gcloud-derived containers:

  • docker volume create activated_service-account
  1. Run the gcloud-config container to activate a Google Cloud service account
  • docker run -it --rm --mount source=activated_service-account,target=/root/.config/gcloud -e GCLOUD_SERVICE_KEY=${GCLOUD_SERVICE_KEY} unspecifiedllc/gcloud-config:latest
  1. In subsequent containers that should operate as the activated service account, mount the volume same volume
  • docker run -it --rm --mount source=activated_service-account,target=/root/.config/gcloud gcr.io/cloud-builders/gcloud auth list

About

un-cloud-builder for decoding a gcloud service key & activating a gcloud account, to be shared with other docker container instances.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages