In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The naming format when using the mirror image:
If REPOSITORY:TAG does not write tag, the default is latest
The format of repository:
Server IP: Port / category / image name: tag does not have to use this naming method. It is only used when we have a relationship with the repository.
If, we need to push the image to the warehouse.
If it is only used locally, it has nothing to do with the warehouse and has nothing to do with repository naming.
Rename an image and label tag: similar to making a hard link to a file, an image can have multiple names
Docker tag docker.io/mysql mysql [root@docker ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/mysql latest b8fd9553f1f0 4 weeks ago 445 MBhub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 2 years ago 602 MB [root@docker ~ ] # [root@docker ~] # docker tag docker.io/mysql mysql [root@docker ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/mysql latest b8fd9553f1f0 4 weeks ago 445 MBmysql latest b8fd9553f1f0 4 weeks ago 445 MBhub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 2 years ago 602 MB [root@docker ~] #
Delete the mirror:
Docker rmi docker.io/mysql:latest
If an image has more than one name tag, the file still exists as long as the tag exists. If all the names are deleted, the file will be deleted.
Please do not use docker.io/mysql, download it with 163s, or there will be problems with it.
Where is the image we downloaded?
Inspection found that the downloaded image was scattered and stored in the hard disk. / var/lib/docker
How the image is stored in the hard disk is determined by the storage driver.
Regardless of the storage driver.
How do I back up / save the image?
Docker save image name > path [root@docker ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/mysql latest b8fd9553f1f0 4 weeks ago 445 MBmysql latest b8fd9553f1f0 4 weeks ago 445 MBhub.c.163.com/ Library/mysql latest 9e64176cd8a2 2 years ago 407 MBhub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 2 years ago 602 MB [root@docker ~] # docker save hub.c.163.com/library/mysql > mysql.tar [root@docker ~] # lsanaconda-ks.cfg initial-setup-ks.cfg mysql.tar how to call a backup image? Docker load-I mysql.tar or use: docker load
< mysql.tar[root@docker ~]# docker load -i mysql.tar295d6a056bfd: Loading layer [==================================================>] 129.2 MB/129.2 MB3b7c5f5acc82: Loading layer [= = >] 344.6 kB/344.6 kBda4155a7d640: Loading layer [= = >] 4.657 MB/4.657 MBdaf31ec3573d: Loading layer [= = >] 1.536 kB/1.536 kB904af8e2b2d5: Loading layer [= >] 39.68 MB/39.68 MB2bee3420217b: Loading layer [= = >] 25.09 kB/25.09 kBe5de8ba20fae: Loading layer [= = >] 3.584 kB/3.584 kB9e615ff77b4f: Loading layer [= >] 240.5 MB/240.5 MBfa9efdcb088a: Loading layer [= = > ] 6.144 kB/6.144 kB3c376267ac82: Loading layer [= = >] 9.216 kB/9.216 kB8129a85b4056: Loading layer [= = >] 1.536 kB/1.536 kBLoaded image: hub.c.163.com/library/mysql:latest [root@docker ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEmysql latest b8fd9553f1f0 4 weeks ago 445 MBhub.c.163.com/library/mysql latest 9e64176cd8a2 2 years ago 407 MBhub.c.163.com/public/centos 6.7-tools b2ab0ed558bb 2 years ago 602 MB
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.