29
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Proxy環境下でDocker for Windowsを使う

Last updated at Posted at 2018-06-22

@ITの記事の通りに進めていたらDocker RunがProxyのせいで引っかかったのでメモ。
手っ取り早く解決したい方は正しい対処法へ

#環境
Docker for Windows (18.03.1-ce)
Windows 10 Pro

#エラー内容
コマンドプロンプトにDocker run hello-worldを打ち込んだらこんな文面のエラーが出てきた。
ざっくり言うとネットに繋がらないみたいなこと?


Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.

#やったこと
Proxyが怪しかったので、タスクトレイにあるDockerアイコンを右クリックして「Settings…」を開いた

002.PNG

Proxiesのメニューを見るとNo proxyが選択されていたので、Manual proxy configurationに選択し直してWeb Server(HTTP)の箇所にProxyのアドレスを入力してApplyをした。が動かない。

003.PNG

#正しい対処法
proxyの後に「:」で区切ってport番号を書いてApplyしたらDocker runができるようになった!

004.PNG


Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:f5233545e43561214ca4891fd1157e1c3c563316ed8e237750d59bde73361e77
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/
29
27
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
29
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?