This project is no longer maintained by Turbine Labs, which has shut down.
This is an image intended to be used as a build base image in a CI environment. It's based on the official CloudSDK alpine image, however it also includes docker and kubectl so you can build and deploy docker images. It will also automatically configure gcloud to access a specific GKE cluster based on environment variables.
To build this project you will need Docker. To deploy a project to GCloud you'll need a GCloud Account account.
This image uses environment variables to configure GCloud authentication, project ids, compute zones and cluster names. Observed environment variables are
GOOGLE_AUTH
: a base64 encoded service account keyGCLOUD_PROJECT_ID
: the ID (not name!) of the project you wish to work withGCLOUD_COMPUTE_ZONE
: the compute zone your cluster is located inGCLOUD_CLUSTER_NAME
: the name of the cluster you wish to work with
Given the length of the GOOGLE_AUTH variable we suggest you keep these values in a file, e.g.
GOOGLE_AUTH=<your base64 encoded service account key>
GCLOUD_PROJECT_ID=<your project ID>
GCLOUD_COMPUTE_ZONE=<your compute zone>
GCLOUD_CLUSTER_NAME=<your cluster name>
CloudSDK configuration is performed when the run level is changed to "boot". To use the container to execute builds you can run
docker run --env-file <your settings> -it turbinelabs/gcloud-build:0.19.0 /bin/bash
open rc boot
If you want to build your own image you can run the following:
docker build -t turbinelabs/gcloud-build:local .
By default this will build an Alpine Linux 3.5 image with GCloud SDK version 168.0.0 and docker. You can override the GCloud SDK version by setting the CLOUD_SDK_VERSION environment variable. You can then use your locally built image by running:
docker run --env-file <your settings> -it turbinelabs/gcloud-build:latest /bin/bash
open rc boot
Please see Versioning of Turbine Labs Open Source Projects.
Patches accepted! Please see Contributing to Turbine Labs Open Source Projects.
All Turbine Labs open-sourced projects are released with a Contributor Code of Conduct. By participating in our projects you agree to abide by its terms, which will be carefully enforced.