Skip to content

Obviate.io

To anticipate and prevent

  • Home
  • About Us
  • History
  • Privacy Policy
  • Toggle search form

Google Container Registry: Simple tagging alternatives

Posted on 2017-09-19 By Jon No Comments on Google Container Registry: Simple tagging alternatives

A few months back I migrated my Docker container image hosting from my private GitLab instance over to Google Cloud Container Registry (GCR.io). It has an included build system that can be triggered by commits to GitHub (and other Git repo’s). It doesn’t do anything too complicated out of the gate, but it’s great for containers related to static sites.

The default build in GCR is a single container with a tag like the commit hash. While this default works for a lot of simple projects I wanted something slightly more complicated… a “latest” tag. Google provides additional capabilities via the

cloudbuild.yaml file. The samples they provide go deep on complexity but here’s a sample cloudbuild.yaml with your image tagged with the commit sha hash and “latest”:

The one thing to keep in mind is that the “tags” section of the yaml is NOT docker tags, it’s used by GCR. Otherwise you could use the above to build multiple images with various tags, or even two different images in the same repository.

GCP Tags:build, container, docker, docker registry, GCP, Google Cloud Platform, image

Post navigation

Previous Post: Now AWS Certified Solutions Architect – Professional!
Next Post: Living Room perfection with NVIDIA SHIELD TV

More Related Articles

Identical Docker, Identical OS – Crashing on 50% of the Hardware AWS
Super slick logging with PapertrailApp Cloud
Tutum – The fastest way to Docker Cloud

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

September 2017
S M T W T F S
 12
3456789
10111213141516
17181920212223
24252627282930
« Aug   Oct »

Copyright © 2022 Obviate.io

Powered by PressBook Premium theme