わさっきhb

大学(教育研究)とか ,親馬鹿とか,和歌山とか,とか,とか.

docker run helloが動かない?

 あるWindows環境で,Dockerを使えるようにしました.
 Docker Desktop for Windowsをインストールしました.再起動し,Docker Hubのアカウントでサインインしてから,PowerShellを起動させて,そこでdocker run helloを実行したところ,エラーメッセージが出ました.

Unable to find image 'hello:latest' locally
C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: pull access denied for hello, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'C:\Program Files\Docker\Docker\resources\bin\docker.exe run --help'.

 メッセージの中に,docker loginというコマンドが書かれているので,試しました.「Authenticating with existing credentials...」のあと「Login Succeeded」と表示されました.そのあと,docker run helloを実行しても,上記と同じエラーメッセージです.
 この件,次のページを見ることで,解決できました.

 実行すべきコマンドは,docker run hello-worldでした.手元の環境で問題なく出力され,docker run -it ubuntu bashについても,うまくいきました.