Resolve host error in Docker

Last night, resolve host error happened to my docker build. This is how it happened.

I was in the office. Docker 1.10.1 is used. I was building docker file based from CentOS 6.6. Half through at yum install step, I decided I close my MacBook (hibernate and not shut down). As it always takes a while to complete this step, and I couldn't wait that day and went home.

At home, when I open my MacBook, the step is still running for a while. I pressed Ctrl+C to terminal the build. And then I type docker-compose build to restart the build again. After then, resolve host error happened when first yum install step is occured. I did many other steps, like removing docker images, docker containers. Non of these worked. It said couldn't resolve host 'mirrorlist.centos.org' or Cannot retrieve repository metadata (repomd.xml) for repository.

After searching for answers from Internet, the one solution that works for me is restarting my MacBook.

Comments

Comments powered by Disqus