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

                                       registry镜像仓库


  
  1. [root@localhost data]# docker search whalesay
  2. INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
  3. docker.io docker.io/docker/whalesay An image for use in the Docker demo tutorial 635
  4. docker.io docker.io/mendlik/docker-whalesay Docker whalesay image from training materi... 7 [OK]
  5. docker.io docker.io/caibar/whalesay Builds automatizados. 1 [OK]
  6. docker.io docker.io/milanfort/whalesay Modified docker/whalesay image that output... 1
  7. docker.io docker.io/nikovirtala/whalesay Tiny Go web service to print Moby Dock ASC... 1 [OK]
  8. docker.io docker.io/ojenge/whalesay from docker/whalesay 1
  9. docker.io docker.io/sabs1117/whalesay Whalesay with fortune phrases. 1
  10. docker.io docker.io/swinton/whalesay whalesay, innit 1
  11. docker.io docker.io/asakilan/pg-whalesay My whalesay 0
  12. docker.io docker.io/blaines/whalesay 0
  13. docker.io docker.io/claytonrogers/docker-whalesay Whalesay automated build 0 [OK]
  14. docker.io docker.io/dhalljohnston/whalesay whalesay 0
  15. docker.io docker.io/dockeramiller/whalesay Modified version of the official docker/wh... 0 [OK]
  16. docker.io docker.io/firecyberice/whalesay Docker **Cloud** automated build for **amd... 0
  17. docker.io docker.io/forsingh/whalesay whalesay 0 [OK]
  18. docker.io docker.io/hongxi/whalesay-fortunes Demo, the whalesay-fortunes 0
  19. docker.io docker.io/jetolabs/whalesay whalesay with fortune cookie messages 0
  20. docker.io docker.io/jracionero/docker-whalesay My smarter docker whalesay 0
  21. docker.io docker.io/laveshin/whalesay whalesay image 0
  22. docker.io docker.io/ox0spy/whalesay-fortune like docker/whalesay, just using fortunes ... 0
  23. docker.io docker.io/phyominhtun/whalesay First WhaleSay Test 0
  24. docker.io docker.io/puneethp/whalesay Docker-Whalesay 0
  25. docker.io docker.io/stealthizer/rpi-whalesay https://github.com/stealthizer/rpi-whalesay 0
  26. docker.io docker.io/tiagoferreira/whalesay Whalesay image 0
  27. docker.io docker.io/whalebrew/whalesay 0
  28. [root@localhost data]# ^C
  29. [root@localhost data]# docker pull docker.io/docker/whalesay
  30. Using default tag: latest
  31. Trying to pull repository docker.io/docker/whalesay ...
  32. latest: Pulling from docker.io/docker/whalesay
  33. e190868d63f8: Pull complete 57.2 MB/65.77 MB
  34. 909cd34c6fd7: Pull complete
  35. 0b9bfabab7c1: Pull complete
  36. a3ed95caeb02: Pull complete
  37. 00bf65475aba: Pull complete
  38. c57b6bcc83e3: Pull complete
  39. 8978f6879e2f: Pull complete
  40. 8eed3712d2cf: Pull complete
  41. Digest: sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258ba93b
  42. Status: Downloaded newer image for docker.io/docker/whalesay:latest
  43. [root@localhost data]# docker images
  44. REPOSITORY TAG IMAGE ID CREATED SIZE
  45. dzx/hello-nginx latest 2a88d3ddfc14 About an hour ago 182 MB
  46. hello_docker latest 24f45ccc6e6c 2 hours ago 4.41 MB
  47. docker.io/ubuntu latest 735f80812f90 7 days ago 83.5 MB
  48. docker.io/nginx latest c82521676580 9 days ago 109 MB
  49. docker.io/rabbitmq 3.7.7-management 8c06649c0351 2 weeks ago 149 MB
  50. docker.io/alpine latest 11cd0b38bc3c 3 weeks ago 4.41 MB
  51. docker.io/docker/whalesay latest 6b362a9f73eb 3 years ago 247 MB

  
  1. [root@localhost data]# docker run docker.io/docker/whalesay cowsay D你好!
  2. ____________
  3. < D你好! >
  4. ------------
  5. \
  6. \
  7. \
  8. ## .
  9. ## ## ## ==
  10. ## ## ## ## ===
  11. /""""""""""""""""___/ ===
  12. ~~~ {~~ ~~~~ ~~~ ~~~~ ~~ ~ / ===- ~~~
  13. \______ o __/
  14. \ \ __/
  15. \____\______/

 


  
  1. [root@localhost data]# docker tag docker/whalesay dzx/whalesay
  2. [root@localhost data]# docker images
  3. REPOSITORY TAG IMAGE ID CREATED SIZE
  4. dzx/hello-nginx latest 2a88d3ddfc14 About an hour ago 182 MB
  5. hello_docker latest 24f45ccc6e6c 2 hours ago 4.41 MB
  6. docker.io/ubuntu latest 735f80812f90 7 days ago 83.5 MB
  7. docker.io/nginx latest c82521676580 9 days ago 109 MB
  8. docker.io/rabbitmq 3.7.7-management 8c06649c0351 2 weeks ago 149 MB
  9. docker.io/alpine latest 11cd0b38bc3c 3 weeks ago 4.41 MB
  10. docker.io/docker/whalesay latest 6b362a9f73eb 3 years ago 247 MB
  11. dzx/whalesay latest 6b362a9f73eb 3 years ago 247 MB
  12. [root@localhost data]# docker push dzx/whalesay
  13. The push refers to a repository [docker.io/dzx/whalesay]
  14. 5f70bf18a086: Preparing
  15. d061ee1340ec: Preparing
  16. d511ed9e12e1: Preparing
  17. 091abc5148e4: Preparing
  18. b26122d57afa: Preparing
  19. 37ee47034d9b: Waiting
  20. 528c8710fd95: Waiting
  21. 1154ba695078: Waiting
  22. denied: requested access to the resource is denied
  23. [root@localhost data]# docker login
  24. 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.
  25. Username: dzx
  26. Password:
  27. Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password

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

文章来源: blog.csdn.net,作者:血煞风雨城2018,版权归原作者所有,如需转载,请联系作者。

原文链接:blog.csdn.net/qq_31905135/article/details/81394990

(完)