LoginSignup
7
4

More than 3 years have passed since last update.

docker buildで Client.Timeoutになったとき

Last updated at Posted at 2019-07-15

docker build が急にできないときの対処。なんか他にあるかもしれないけど。。

結論

Client.Timeout発生

docker restartしたら治った。

環境

  • Windows10
  • Hyper-Vにdockerインストール

状況

request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
というのが発生してdocker buildが正常終了しない。

> docker build .
Sending build context to Docker daemon  28.46MB
Step 1/5 : From python:3
Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

対処

dockerのrestart

タスクバーのdockerアイコンで右クリック。
docker_restart01.png
docker_restart02.png
docker_restart03.png
このタイミングでシーンとしているけど、再起動中。↓
ちょっと時間かかる。
docker_restart05.png
再起動終わったらピローンとアラートが出る。
docker_restart06.png
こんなふうになったらOK。
docker_restart04.png

docker restart後

> docker build .
Sending build context to Docker daemon  28.46MB
Step 1/5 : From python:3
3: Pulling from library/python
5ae19949497e: Pull complete
ed3d96a2798e: Pull complete
f12136850781: Pull complete
1a9ad5d5550b: Pull complete
6f18049a0455: Pull complete
ce39fa9d79d1: Pull complete
3a91ffcf88ea: Pull complete
ee82cc8e1506: Pull complete
bf0dbf90a115: Pull complete
Digest: sha256:87fd2bad3de70a5e779a91d7e2ec2bd01115dfe3faf97dacf730a7f4155d11d8
Status: Downloaded newer image for python:3
 ---> 42d620af35be
(省略)
Step 5/5 : RUN pip install --upgrade pip
 ---> Running in 2e235b67b06f
Requirement already up-to-date: pip in /usr/local/lib/python3.7/site-packages (19.1.1)
Removing intermediate container 2e235b67b06f
 ---> fedda0f62e54
Successfully built fedda0f62e54
7
4
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
7
4