LoginSignup
7
9

More than 5 years have passed since last update.

Docker for Windows で hello-world が pull できない問題の対処法

Posted at

現象

Hyper-V を利用した Docker for Windowsをインストールしたものの、hello-world のイメージの取得に失敗しました。

PS C:\Users\Owner> docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Network timed out while trying to connect to https://index.dock
er.io/v1/repositories/library/hello-world/images. You may want to check your internet connection or if you are behind a
proxy..
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

環境

OS Windows 10 pro 64bit
Docker 1.12.0-rc4
CLI Powershell 5.0.10586.494

対処法

こちらに記事がありました。
Docker for Windows (Hyper-V) を試してみたよ#コンテナから外部ネットワークに接続

こちらが画像付きでわかりやすいので詳しくは見ていただくとして、簡単に手順を書くと下記のとおりです。

  1. Hyper-V マネージャで「外部ネットワーク」スイッチを追加し、
  2. MobyLinuxVMの [ハードウェアの追加] > [ネットワークアダプタ] から作成したスイッチを追加
  3. Dockerを再起動(タスクトレイのDockerアイコンから [Settings...] > [Reset] > [Restart Docker...]

3.の再起動がないと反映されません。

※DockerNATの設定を「内部ネットワーク」から「外部ネットワーク」に変更すれば良いのではないか?と考えましたが、下記のエラーでうまくいきませんでした。

PS C:\Users\Owner> docker run hello-world
Unable to find image 'hello-world:latest' locally
Pulling repository docker.io/library/hello-world
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error while pulling image: Get https://index.docker.io/v1/repos
itories/library/hello-world/images: dial tcp: lookup index.docker.io on 192.168.65.3:53: server misbehaving.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
7
9
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
9