LoginSignup
1
2

More than 3 years have passed since last update.

Dockerでbuildを実行したら、名前解決が出来ずにエラー

Last updated at Posted at 2020-05-31

Ubuntu 20.04で
$ docker build .

を実行したら、以下のようなエラーが複数回発生してタイムアウトした。

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError(': Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/pipenv/

$ sudo vi /etc/default/docker
でDockerの設定ファイルを開き

DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
のコメントアウトを外した後

$ sudo service docker restart
でエラーが解消された。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2