Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.6 KB

File metadata and controls

38 lines (29 loc) · 1.6 KB

+++ title = "Google Container Registry (GCR)" description = "Google Container Registry" gh_repo = "habitat"

[menu] [menu.habitat] title = "Google Container Registry (GCR)" identifier = "habitat/containers/gcr GCR" parent = "habitat/containers" weight = 60

+++ 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

Related Reading