Google Container Registry (GCR)

[edit on GitHub]

Google Container Registry is a private Docker repository that works with popular continuous delivery systems. It runs on GCP to provide consistent uptime on an infrastructure protected by Google’s security. The registry service hosts your private images in Cloud Storage under your GCP project.

Before you can push or pull images, you must configure Docker to use the gcloud command-line tool to authenticate requests to Container Registry. To do so, run the following command (you are only required to do this once):

$ gcloud auth configure-docker

Further access control information is available here.

After a successful Chef Habitat package build, images can be pushed to the Container Registry using the registry URI. The format of this follows: [HOSTNAME]/[PROJECT-ID]/[IMAGE]:[TAG], more details at this link:

$ hab pkg export docker ./results/habskp-hab-gcr-demo-0.1.0-20180710145742-x86_64-linux.hart
$ docker tag habskp/hab-gcr-demo:latest eu.gcr.io/user-project/hab-gcr-demo:latest
$ docker push eu.gcr.io/user-project/hab-gcr-demo:latest

© Chef Software, Inc.
Licensed under the Creative Commons Attribution 3.0 Unported License.
The Chef™ Mark and Chef Logo are either registered trademarks/service marks or trademarks/servicemarks of Chef, in the United States and other countries and are used with Chef Inc's permission.
We are not affiliated with, endorsed or sponsored by Chef Inc.
https://docs.chef.io/habitat/gcr/