Docker学习笔记(三) registry镜像仓库

                                       registry镜像仓库

[root@localhost data]# docker search whalesay
INDEX       NAME                                      DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
docker.io   docker.io/docker/whalesay                 An image for use in the Docker demo tutorial    635                  
docker.io   docker.io/mendlik/docker-whalesay         Docker whalesay image from training materi...   7                    [OK]
docker.io   docker.io/caibar/whalesay                 Builds automatizados.                           1                    [OK]
docker.io   docker.io/milanfort/whalesay              Modified docker/whalesay image that output...   1                    
docker.io   docker.io/nikovirtala/whalesay            Tiny Go web service to print Moby Dock ASC...   1                    [OK]
docker.io   docker.io/ojenge/whalesay                 from docker/whalesay                            1                    
docker.io   docker.io/sabs1117/whalesay               Whalesay with fortune phrases.                  1                    
docker.io   docker.io/swinton/whalesay                whalesay, innit                                 1                    
docker.io   docker.io/asakilan/pg-whalesay            My whalesay                                     0                    
docker.io   docker.io/blaines/whalesay                                                                0                    
docker.io   docker.io/claytonrogers/docker-whalesay   Whalesay automated build                        0                    [OK]
docker.io   docker.io/dhalljohnston/whalesay          whalesay                                        0                    
docker.io   docker.io/dockeramiller/whalesay          Modified version of the official docker/wh...   0                    [OK]
docker.io   docker.io/firecyberice/whalesay           Docker **Cloud** automated build for **amd...   0                    
docker.io   docker.io/forsingh/whalesay               whalesay                                        0                    [OK]
docker.io   docker.io/hongxi/whalesay-fortunes        Demo, the whalesay-fortunes                     0                    
docker.io   docker.io/jetolabs/whalesay               whalesay with fortune cookie messages           0                    
docker.io   docker.io/jracionero/docker-whalesay      My smarter docker whalesay                      0                    
docker.io   docker.io/laveshin/whalesay               whalesay image                                  0                    
docker.io   docker.io/ox0spy/whalesay-fortune         like docker/whalesay, just using fortunes ...   0                    
docker.io   docker.io/phyominhtun/whalesay            First WhaleSay Test                             0                    
docker.io   docker.io/puneethp/whalesay               Docker-Whalesay                                 0                    
docker.io   docker.io/stealthizer/rpi-whalesay        https://github.com/stealthizer/rpi-whalesay     0                    
docker.io   docker.io/tiagoferreira/whalesay          Whalesay image                                  0                    
docker.io   docker.io/whalebrew/whalesay                                                              0                    
[root@localhost data]# ^C
[root@localhost data]# docker pull  docker.io/docker/whalesay
Using default tag: latest
Trying to pull repository docker.io/docker/whalesay ... 
latest: Pulling from docker.io/docker/whalesay
e190868d63f8: Pull complete                                                      57.2 MB/65.77 MB
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.io/docker/whalesay:latest
[root@localhost data]# docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
dzx/hello-nginx             latest              2a88d3ddfc14        About an hour ago   182 MB
hello_docker                latest              24f45ccc6e6c        2 hours ago         4.41 MB
docker.io/ubuntu            latest              735f80812f90        7 days ago          83.5 MB
docker.io/nginx             latest              c82521676580        9 days ago          109 MB
docker.io/rabbitmq          3.7.7-management    8c06649c0351        2 weeks ago         149 MB
docker.io/alpine            latest              11cd0b38bc3c        3 weeks ago         4.41 MB
docker.io/docker/whalesay   latest              6b362a9f73eb        3 years ago         247 MB
[root@localhost data]# docker run docker.io/docker/whalesay cowsay D你好!
 ____________ 
< D你好! >
 ------------ 
    \
     \
      \     
                    ##        .            
              ## ## ##       ==            
           ## ## ## ##      ===            
       /""""""""""""""""___/ ===        
  ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ /  ===- ~~~   
       \______ o          __/            
        \    \        __/             
          \____\______/   
[root@localhost data]# docker tag docker/whalesay dzx/whalesay
[root@localhost data]# docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
dzx/hello-nginx             latest              2a88d3ddfc14        About an hour ago   182 MB
hello_docker                latest              24f45ccc6e6c        2 hours ago         4.41 MB
docker.io/ubuntu            latest              735f80812f90        7 days ago          83.5 MB
docker.io/nginx             latest              c82521676580        9 days ago          109 MB
docker.io/rabbitmq          3.7.7-management    8c06649c0351        2 weeks ago         149 MB
docker.io/alpine            latest              11cd0b38bc3c        3 weeks ago         4.41 MB
docker.io/docker/whalesay   latest              6b362a9f73eb        3 years ago         247 MB
dzx/whalesay                latest              6b362a9f73eb        3 years ago         247 MB
[root@localhost data]# docker push dzx/whalesay
The push refers to a repository [docker.io/dzx/whalesay]
5f70bf18a086: Preparing 
d061ee1340ec: Preparing 
d511ed9e12e1: Preparing 
091abc5148e4: Preparing 
b26122d57afa: Preparing 
37ee47034d9b: Waiting 
528c8710fd95: Waiting 
1154ba695078: Waiting 
denied: requested access to the resource is denied
[root@localhost data]# docker login
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: dzx
Password: 
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

以上为查找镜像,拉取镜像,发布镜像到docker hub上面

猜你喜欢

转载自blog.csdn.net/qq_31905135/article/details/81394990