- docker Run
Step 4/17 : RUN apt-get update && apt-get clean && apt-get install -y autoconf automake libtool build-essentialW: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease Temporary failure resolving ‘deb.debian.org’
W: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/InRelease Temporary failure resolving ‘security.debian.org’
W: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/InRelease Temporary failure resolving ‘deb.debian.org’
W: Some index files failed to download. They have been ignored, or old ones used instead.
起初我以為是我的server DNS有問題
ping google.com 或 sudo apt-get update都沒有任何問題…
後來發現是docker server DNS需要更正
解法:
- 修改docker daemon.json
vim /etc/docker/daemon.json
{
"dns": ["8.8.8.8"]
}
- Restart Docker
sudo service docker restart
此問題就解決了.