I\'m using shippable to push private docker images to the Google Container Registry that I then want to pull from either locally on a laptop, or inside an instance on the Go
If you want to work with the Google Container Registry on a machine not in the Google Compute Engine (i.e. local) using vanilla docker you can follow Google's instructions.
The two main methods are using an access token or a JSON key file.
Note that _token
and _json_key
are the actual values you provide for the username (-u
)
Access Token
$ docker login -e 1234@5678.com -u _token -p "$(gcloud auth print-access-token)" https://gcr.io
JSON Key File
$ docker login -e 1234@5678.com -u _json_key -p "$(cat keyfile.json)" https://gcr.io
To create a key file you can follow these instructions:
You can view Google's documentation on generating a key file here.