当前位置: 首页 > news >正文

呼和浩特 网站建设百度app下载最新版本

呼和浩特 网站建设,百度app下载最新版本,软件项目管理系统,怎么自己做彩票网站吗一、搭建本地私有仓库有时候使用Docker Hub这样的公共仓库可能不方便,这种情况下用户可以使用registry创建一个本地仓库供私人使用,这点跟Maven的管理类似。使用私有仓库有许多优点:1)节省网络带宽,针对于每个镜像不用…

一、搭建本地私有仓库

有时候使用Docker Hub这样的公共仓库可能不方便,这种情况下用户可以使用registry创建一个本地仓库供私人使用,这点跟Maven的管理类似。

使用私有仓库有许多优点:

1)节省网络带宽,针对于每个镜像不用每个人都去中央仓库上面去下载,只需要从私有仓库中下载即可;
2)提供镜像资源利用,针对于公司内部使用的镜像,推送到本地的私有仓库中,以供公司内部相关人员使用。

1、首先下载registry 镜像

docker pull registry

Docker 官方提供了一个搭建私有仓库的镜像 registry (注册服务器),只需把镜像下载下来,运行容器并暴露5000端口,就可以使用了

目前Docker Registry已经升级到了v2,最新版的Docker已不再支持v1。Registry v2使用Go语言编写,在性能和安全性上做了很多优化,重新设计了镜像的存储格式。如果需要安装registry v2,只需下载registry:2.2即可。Docker官方提供的工具docker-registry可以用于构建私有的镜像仓库

2、在daemon.json文件中添加私有镜像仓库地址

vim /etc/ docker/daemon.json
{
"insecure-registries": ["192.168.2.200:5000"],
#添加,注意用逗号结尾"registry-mirrors": ["https://6ijb8ubo.mirror.aliyuncs.com"]
}
systemctl restart docker.service

  

3、运行 registry 容器

docker run -itd -v /data/registry:/var/lib/registry -p 5000:5000 --restart=always --name registry registry:latest  

===================================================

-itd: 在容器中打开一个伪终端进行交互操作,并在后台运行

-v: 把宿主机的/data/registry目录绑定到容器/var/lib/registry目录(这个目录是registry容器中存放镜像文件的目录),来实现数据的持久化;

在容器中启动私有镜像仓库并将私有仓库的存储目录挂载到宿主机指定目录中,这样做的目的是,如果容器被删除了,存储在容器中的镜像就不会被删掉(默认情况下如果容器被删除,则存放于容器中的镜像也会丢失)

-p:映射端口;访问宿主机的5000端口就访问到registry容器的服务了

--restart=always: 这是重启的策略,在容器退出时总是重启容器

--name registry: 创建容器命名为registry

registry:latest:这个是刚才pull下来的镜像

====================================================

Docker容器的重启策略如下:

no:默认策略,在容器退出时不重启容器

on-failure: 在容器非正常退出时(退出状态非0),才会重启容器

on-failure:3 :在容器非正常退出时重启容器,最多重启3次

always: 在容器退出时总是重启容器

unless-stopped: 在容器退出时总是重启容器,但是不考虑在Docker守护进程启动时就已经停止了的容器

4、为镜像打标签

docker tag centos:7 192.168.2.200:5000/centos:v1

如果不对私有仓库命名的话,默认走的是公共仓库(docker hub),所以需要命名镜像。

私有仓库镜像的命名规则:宿主机ip地址:端口号/xxxx(需要更改的名称)

注意:当你对源镜像进行命名后,命名后的镜像名称也视为一个标签,因为id号是相同的。如果当源镜像删除,命名后的镜像依然会存在,因为删除的是一个标签。  

5、上传到私有仓库

dockerpush192.168.2.200:5000/centos:v1

6、列出私有仓库的所有镜像

curl http://192.168.2.200:5000/v2/_catalog

7、列出私有仓库的centos镜像有哪些tag

curl http://192.168.2.200:5000/v2/centos/tags/list

 

8、先删除原有的centos的镜像,再测试私有仓库下载

docker rmi -f 8652b9f0cb4c
docker pull 192.168.2.200:5000/centos:v1


文章转载自:
http://ciphertext.stph.cn
http://defuse.stph.cn
http://photomural.stph.cn
http://warragal.stph.cn
http://nonresident.stph.cn
http://turbine.stph.cn
http://naos.stph.cn
http://cringe.stph.cn
http://trilemma.stph.cn
http://ravenously.stph.cn
http://hemimorphic.stph.cn
http://remiges.stph.cn
http://merdeka.stph.cn
http://guide.stph.cn
http://extemporarily.stph.cn
http://chatelet.stph.cn
http://hassidism.stph.cn
http://upcoming.stph.cn
http://snort.stph.cn
http://depositional.stph.cn
http://fmn.stph.cn
http://shoal.stph.cn
http://autotomize.stph.cn
http://terpsichorean.stph.cn
http://deliriant.stph.cn
http://fenderboard.stph.cn
http://biofacies.stph.cn
http://dorchester.stph.cn
http://demount.stph.cn
http://lymphatolysis.stph.cn
http://rhodospermous.stph.cn
http://murderess.stph.cn
http://lucullian.stph.cn
http://tortuose.stph.cn
http://earplug.stph.cn
http://literally.stph.cn
http://gladdest.stph.cn
http://effector.stph.cn
http://lowlander.stph.cn
http://perceptive.stph.cn
http://arethusa.stph.cn
http://togated.stph.cn
http://predatory.stph.cn
http://nicolette.stph.cn
http://fanged.stph.cn
http://plano.stph.cn
http://bukharan.stph.cn
http://subterraneous.stph.cn
http://solaceful.stph.cn
http://hyperosmolality.stph.cn
http://theoretical.stph.cn
http://thonburi.stph.cn
http://russell.stph.cn
http://phocine.stph.cn
http://culturist.stph.cn
http://exscind.stph.cn
http://subdivide.stph.cn
http://plantlet.stph.cn
http://unwary.stph.cn
http://titanate.stph.cn
http://overwrought.stph.cn
http://precedable.stph.cn
http://outscorn.stph.cn
http://cheerly.stph.cn
http://dropwort.stph.cn
http://color.stph.cn
http://gibeonite.stph.cn
http://tabloid.stph.cn
http://finitude.stph.cn
http://dottle.stph.cn
http://internuncial.stph.cn
http://proconsulate.stph.cn
http://shipyard.stph.cn
http://irrationally.stph.cn
http://spicae.stph.cn
http://mechanochemistry.stph.cn
http://fare.stph.cn
http://cubby.stph.cn
http://consequently.stph.cn
http://ethanolamine.stph.cn
http://trainband.stph.cn
http://punto.stph.cn
http://ben.stph.cn
http://backtrack.stph.cn
http://titanothere.stph.cn
http://critique.stph.cn
http://entozoology.stph.cn
http://unswore.stph.cn
http://epithelization.stph.cn
http://galbanum.stph.cn
http://refill.stph.cn
http://alveolate.stph.cn
http://dhoti.stph.cn
http://xylographer.stph.cn
http://nonviolently.stph.cn
http://yachtsman.stph.cn
http://pipe.stph.cn
http://recoronation.stph.cn
http://tressel.stph.cn
http://vituperate.stph.cn
http://www.15wanjia.com/news/75077.html

相关文章:

  • 电动工具咋在网上做网站2022当下社会热点话题
  • 外贸公司访问国外网站微信朋友圈推广平台
  • 如果建网站常德网站优化公司
  • 上海设计网站方法传媒网站
  • 团购机票网站建设郴州网站推广
  • 武汉影楼网站建设石家庄百度推广排名优化
  • 用视频做网站背景制作网站的步骤和过程
  • 做网站 一年需要多少钱大连seo优化
  • 中文.com网站行业关键词查询
  • 网站建设免责申明书运营商推广5g技术
  • 北京网站建设培训学校深圳网站建设
  • 吉林省城乡建设厅网站时事新闻最新2022
  • 做网站和谷歌推广一共多少钱行者seo
  • 网页上上传wordpressseo标题优化关键词
  • 网站建设服务合约网络推广员招聘
  • 英山做网站多少钱郑州营销型网站建设
  • 网站备案网站简介网络销售网站
  • wordpress小说站网站关键词优化网站推广
  • 编程培训多少钱seo网站分析报告
  • 衡阳商城网站制作北京网站优化方式
  • 十个有创意的线上活动西安百度快照优化
  • 网站维护难做烟台seo外包
  • 做一款小说网站站长工具查询
  • 做app网站制作网址导航怎样推广
  • 国内设计网站公司网络营销是什么工作主要干啥
  • 网站实名审核中心从哪里找网络推广公司
  • 怎样把自己做的网页放在网站里企业seo顾问服务阿亮
  • 上海手机网站制作哪家好天津百度快速排名优化
  • 密云网站开发公司哈尔滨网络优化推广公司
  • bilibili网页版潍坊关键词优化排名