Error response from daemon: Get https://azure/v2/: dial tcp: lookup azure: no such host
Asked Answered
R

3

8

I am trying to pull docker image from docker hub to azure following this docs on docker https://docs.docker.com/cloud/aci-integration/.

when I enter the command:

 docker login azure

I get the error:

Error response from daemon: Get https://azure/v2/: dial tcp: lookup azure: no such host

I am not behind any vpn or proxy. I have tried some of the solutions mentioned in other threads like adding 8.8.8.8 & 8.8.8.4 in my resolv.conf and restarting docker daemon. But those solutions did not work.

Rainer answered 20/5, 2021 at 16:35 Comment(5)
Any updates on the question? Does it solve your problem? If it works for you please accept it.Motte
No, I could solve my problem with your answer. For now I stopped suing docker login azure command and instead use azure cli or portal.Rainer
The Azure CLI command also does the same thing that creates a credential of the ACR for your local docker. If it works well, then the local docker will also work well. There must be something wrong you made.Motte
I have had the same problem: docker login azure fails but az login works well. So it is clearly not a network problem.Luciano
Same problem here on ubuntu 20.04, use az login instead and it works as of 16/9/2021Pachyderm
L
3

I am on Ubuntu 20.04 and I had the same problem. I fixed it by uninstalling the docker-compose package which ubuntu provided and using the install script as documented here. The Ubuntu package doesn't seem to have the Azure integration features built-in.

Luciano answered 28/5, 2021 at 5:25 Comment(3)
I had docker composer already installed and still go the same error.Rainer
how is docker-compose installed in your case? on which OS?Luciano
I am running docker and composer on ubuntu 20.04. Docekr compose version: docker-compose version 1.29.2, build 5becea4cRainer
R
2

This indicates that you've missed one of the prerequisites. Most likely you are trying to run this from Docker CE rather than one of the Docker Desktop installs on Mac/Windows. Alternatively, replacing the docker binary with one from the docker-compose install should get this to work on Linux.

Retreat answered 4/12, 2021 at 23:52 Comment(1)
I removed all the docker-ce packages, went to Docker Desktop and verified that docker was enabled for wsl. Closed and launched a new WSL terminal, and now it works.Smallminded
M
-1

The possible reason is that there is a policy or multiple policies in your network that block the traffic. So you can try to use another machine to log in to Azure or check the network.

Motte answered 21/5, 2021 at 2:20 Comment(1)
I had the same problem in ubuntu 20.04, the fact that I could login with az login but not docker login azure suggestes that network is not the root causePachyderm

© 2022 - 2024 — McMap. All rights reserved.