Unable to docker login into azure container registry

Viewed 845

We are using docker swarm for windows and have several swarms. Most of them works great, but when making a new one, we are now currently failing the docker login. The code used to login is:

echo "$(acrPassword)" | docker login --username $(acrUsername) --password-stdin  $(acrServer)

This line works perfectly well on other swarms, but on this new one, it fails with the following error:

[error]docker : Error response from daemon: Get https://myaccount.azurecr.io/v2/: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

here is the result from docker version:

Server: Docker Engine - Enterprise Engine: Version: 19.03.5 API version: 1.40 (minimum version 1.24) Go version: go1.12.12 Git commit: 2ee0c57608 Built: 11/13/2019 07:58:51 OS/Arch: windows/amd64 Experimental: false

Edit: Found the issue, it was an older version of windows. Changed the Windows verison and fixed the issue.

1 Answers

Have you tried to login in to your ACR using the Azure CLI?

az acr login --name acrServer
Related