1.registry 镜像仓库

1.1 鲸鱼说话(无实际意义)

vagrant@ubuntu-xenial:/data/www$ docker search whalesay                                  #搜索whalesay,这里我们选择STARS多的
NAME                           DESCRIPTION                                     STARS               OFFICIAL            AUTOMATED
docker/whalesay                An image for use in the Docker demo tutorial    681
nikovirtala/whalesay           Tiny Go web service to print Moby Dock ASCII…   1                                       [OK]
milanfort/whalesay             Modified docker/whalesay image that outputs …   1
ojenge/whalesay                from docker/whalesay                            1
swinton/whalesay               whalesay, innit                                 1
sabs1117/whalesay              Whalesay with fortune phrases.                  1
caibar/whalesay                Builds automatizados.                           1                                       [OK]
getporter/whalesay-installer                                                   0
yang225217/whalesay                                                            0
firecyberice/whalesay          Docker **Cloud** automated build for **amd64…   0
dhalljohnston/whalesay         whalesay                                        0
getporter/whalesay                                                             0
whalebrew/whalesay                                                             0
blaines/whalesay                                                               0
forsingh/whalesay              whalesay                                        0                                       [OK]
nikovirtala/whalesay-win       Whalesay running on Microsoft IIS on Nano Se…   0                                       [OK]
burleyinnersbm07/whalesay      Edit to the WhaleSay                            0
gapfish/whalesay-ruby          whalesay function test                          0
hongxi/whalesay-fortunes       Demo, the whalesay-fortunes                     0
dockeramiller/whalesay         Modified version of the official docker/whal…   0                                       [OK]
maghnus/whalesayentrypoint     I need a version of whalesay with entrypoint…   0
ox0spy/whalesay-fortune        like docker/whalesay, just using fortunes pr…   0
phyominhtun/whalesay           WhaleSay Container                              0
tpei/whalesay-crystal          crystal faas demo function                      0
jetolabs/whalesay              whalesay with fortune cookie messages           0

vagrant@ubuntu-xenial:/data/www$ docker pull docker/whalesay             #去官方拉取这个镜像到本地
Using default tag: latest
latest: Pulling from docker/whalesay
Image docker.io/docker/whalesay:latest uses outdated schema1 manifest format. Please upgrade to a schema2 image for better future compatibility. More information at https://docs.docker.com/registry/spec/deprecated-schema-v1/
e190868d63f8: Pull complete
909cd34c6fd7: Pull complete
0b9bfabab7c1: Pull complete
a3ed95caeb02: Pull complete
00bf65475aba: Pull complete
c57b6bcc83e3: Pull complete
8978f6879e2f: Pull complete
8eed3712d2cf: Pull complete
Digest: sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258ba93b
Status: Downloaded newer image for docker/whalesay:latest

vagrant@ubuntu-xenial:/data/www$ docker images    #查看已经有这个镜像   
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
docker/whalesay     latest              6b362a9f73eb        5 years ago         247MB

vagrant@ubuntu-xenial:/data/www$ docker run docker/whalesay cowsay good     # 鲸鱼说话
< good >
                    ##        .
              ## ## ##       ==
           ## ## ## ##      ===
       /""""""""""""""""___/ ===
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~
       \______ o          __/
        \    \        __/

copy 一个镜像到自己的远程镜像仓库

vagrant@ubuntu-xenial:/data/www$ docker tag docker/whalesay   niuzheng131400/whalesay      #以docker/whalesay为基础生成一个新的标签niuzheng131400/whalesay的镜像
vagrant@ubuntu-xenial:/data/www$ docker images
REPOSITORY                    TAG                 IMAGE ID            CREATED             SIZE                       latest              a24bb4013296        3 months ago        5.57MB
docker/whalesay               latest              6b362a9f73eb        5 years ago         247MB
niuzheng131400/whalesaytets   latest              6b362a9f73eb        5 years ago         247MB

denied: requested access to the resource is denied 就是未登录没有权限 docker官网注册

vagrant@ubuntu-xenial:/data/www$ docker login      # 做push之前我们要先登录
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: niuzheng131400
WARNING! Your password will be stored unencrypted in /home/vagrant/.docker/config.json.
Configure a credential helper to remove this warning. See

Login Succeeded
vagrant@ubuntu-xenial:/data/www$ docker push niuzheng131400/whalesaytets   #上传到远程镜像仓库



Last modification:October 12th, 2020 at 09:57 am