Google Container Registry (GCR) Reference
Kip Landergren
(Updated: )
My cheat sheet for Google Container Registry covering integration with Docker, transferring images, and domain-specific terminolgy.
Contents
Docker Integration
Register gcloud
as credential helper:
gcloud auth configure-docker
Tag local image:
docker tag LOCAL-IMAGE-NAME gcr.io/PROJECT-NAME/IMAGE-NAME:TAG
Push to GCR:
docker push gcr.io/PROJECT-NAME/IMAGE-NAME:TAG
Pull from GCR:
docker pull gcr.io/PROJECT-NAME/IMAGE-NAME:TAG
Pulling Image to GKE from GCR
Quick steps:
- confirm image stored and accessible on gcr.io
- specify the gcr.io image in manifest, optionally including tag
- same project / same account? should “just work”
- not working? check service account permissions for
https://www.googleapis.com/auth/devstorage.read_only
- still not working? consider setting bucket-level permissions
GCR Terminology
- bucket
- a container for your objects; cannot be nested within another
- object
- the piece of data stored
Documentation
- Official Google Cloud Storage Documentation