Created
January 16, 2018 07:24
-
-
Save berndverst/b1b0bf8c72e232e96a595f6a6fb22b58 to your computer and use it in GitHub Desktop.
Docker Login Help for Azure Container Registries. Add to your BASH or ZSH .rc file
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
alias acr-login="echo 'Fetching available Azure container registries...'; az acr list -otable --query='[*].{Name:name,Group:resourceGroup,Location:location}'; echo '\nEnter registry name:'; read azregistry; az acr credential show -n \$azregistry --query='[passwords[0]][0].value' -otsv | docker login -u \$azregistry --password-stdin \$azregistry.azurecr.io" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this to your
~/.zshrc
,~/.bashrc
or~/.bash_profile
.Note: this require registries to be
admin-enabled
. You can do so viaaz acr update --name $azregistryname --admin-enabled true
where$azregistryname
is the name of your container registry.Example: