Skip to content

Instantly share code, notes, and snippets.

@smolin
Last active December 19, 2017 18:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smolin/28abbfe03205bd84cdfbfa081990a0b4 to your computer and use it in GitHub Desktop.
Save smolin/28abbfe03205bd84cdfbfa081990a0b4 to your computer and use it in GitHub Desktop.
notes on docker-vagrant-gcloud
# see also https://gist.github.com/smolin/d91b76b0eb84665e0958a1e4cf157e19
(docker build .)
#
# nb: use project ID 'vc-dev-smolin-f263' NOT project name 'vc-dev-smolin':
docker tag alpine gcr.io/vc-dev-smolin-f263/alpine
# docker 'login' against a remote image repo (nb: this isn't really a login in
# traditional sense, it only makes available a credential for use in future
# interactions):
docker login -u _json_key -p "$(cat vc-dev*json)" https://gcr.io
#
# or maybe:
docker login -u _token -p "$(gcloud auth print-access-token)" https://gcr.io
# list available docker credentials with
docker-credential-gcr list
docker-credential-osxkeychain list
# remove a credential with
echo https://gcr.io | docker-credential-osxkeychain erase
# push image to GCR:
docker push gcr.io/vc-dev-smolin-f263/alpine
# or (why?) gcloud docker -- push gcr.io/vc-dev-smolin-f263/alpine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment