简体   繁体   中英

Docker pull images No such host error on mac osx

I recently installed latest docker on my mac and i'm getting following error on pulling images.

First I install latest docker form mac binary and then i run

docker run -d -p 80:80 --name webserver nginx

And it return

ERROR: Service 'nginx' failed to build: Error while pulling image:
Gethttps://index.docker.io/v1/repositories/library/nginx/images: dial tcp:
lookup index.docker.io on ***.***.**.*:**: no such host

How can i fix this ?

After some days research I can't get the actual solution so i did one trick and worked for me. what i done is I open the docker preferences and there is a option reset to factory defaults and i reset my docker but it deletes all my containers and images after all it works. Thanks everyone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM