Last active
December 19, 2017 18:26
-
-
Save smolin/28abbfe03205bd84cdfbfa081990a0b4 to your computer and use it in GitHub Desktop.
notes on docker-vagrant-gcloud
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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