検証した環境は下記の通り
windows 10 Pro
64ビット
Docker for Windowsをダウンロードしてインストール
- 適当にググってインストールする。特に特殊なことは無かった。
- 下記参考にしたサイト
http://www.atmarkit.co.jp/ait/articles/1609/01/news053.html
hello-world 実行前に
- 下記サイトを参考に、Hyper-Vマネージャからネットワークアダプタを追加
https://qiita.com/noobar/items/c7c1e7e290102a3230ff
docker run hello-world → 失敗
>docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Get https://registry-1.docker.io/v2/library/hello-world/manifests/latest: unauthorized: incorrect username or password.
See 'docker run --help'.
docker pull hello-world → 失敗
>docker pull hello-world
Using default tag: latest
Warning: failed to get default registry endpoint from daemon (Error response from daemon: An invalid argument was supplied.). Using system default: https://index.docker.io/v1/
Error response from daemon: An invalid argument was supplied.
dockerの設定をしてみた
- 下記を参考に
https://stackoverflow.com/questions/43058226/docker-warning-failed-to-get-default-registry-endpoint-from-daemon
タスクトレイのdockerアイコン右クリック-setting
の画面で、赤線のチェックボックスをチェックする
- dockerをrestart
認証もしておこう
>docker login
Authenticating with existing credentials...
Stored credentials invalid or expired
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username (xxxx@xxxx): xxxxxx ← メールアドレスではない ユーザID
Password: ← 文字を入力してもカーソルが動かない コピペできるのか不明
Login Succeeded
再度 docker run hello-world → やっと成功!!
>docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9db2ca6ccae0: Pull complete
Digest: sha256:4b8ff392a12ed9ea17784bd3c9a8b1fa3299cac44aca35a85c90c5e3c7afacdc
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/