学会使用docker命令来下载镜像
下载镜像的命令非常简单,使用docker pull命令即可。(译者按:docker命令和git有一些类似的地方)。在docker的镜像索引网站上面,镜像都是按照 用户名/ 镜像名的方式来存储的。有一组比较特殊的镜像,比如ubuntu这类基础镜像,经过官方的验证,值得信任,可以直接用 镜像名来检索到。
目标:
通过docker命令下载tutorial镜像。
提示:
执行pull命令的时候要写完整的名字,比如"learn/tutorial"。
正确的命令:
$ docker pull learn/tutorial
Using default tag: latest
Error response from daemon: Get https://registry-1.docker.io/v2/learn/tutorial/manifests/latest: unauthorized: incorrect username or password
Using default tag: latest
latest: Pulling from learn/tutorial
271134aeb542: Pull complete
Digest: sha256:2933b82e7c2a72ad8ea89d58af5d1472e35dacd5b7233577483f58ff8f9338bd
Status: Downloaded newer image for learn/tutorial:latest