本篇我将为大家介绍Docker中的另外个重头戏——Registry,博主在15年的11月份参加了WOT大会,期间有个朋友问了我“Docker如何做环境管理?”,其实问题的本质就是当我们拥有多个DockerHost的时候,每个DockerHost都需要去公有Registry(Hub)去Pull一次,那么消耗的资源是非常巨大的,且每次更新都非常不方便,所以衍生出了一个需求,我们需要构建自有的镜像库,而这个镜像库,就称之为Registry(其实我更喜欢叫私有Hub)。
以下就是今天所要说DockerFile涉及的环境:
1、 Registry可以作为独立的VM或者Registry Host运行,也可以使用Container方式运行,这里使用Container方式创建,运行(这里要介绍多一个Run参数,-e,-e是用作指定Container的环境变量所用):
docker run -d -e SETTINGS_FLAVOR=dev -e STORAGE_PATH=/etc/registry -v /opt/data/registry:/etc/registry –hostname=DR01 –name=DR01 -p 5000:5000 registry
2、 现在我们就可以将本地或远程Host的Images上传到我们的私有Hub了,首先为需要上传的Images打上标签,docker tag 87da34db3c1a 127.0.0.1:5000/vmctestv4(格式为docker tag ImagesID RegistryIP: Registry端口/ImagesName):
3、 接着使用docker push 127.0.0.1:5000/vmctestv4将刚刚打好标签的images上传到本地DR中:
4、 现在我们把刚刚上传上去的本地Images删除:
5、 OK,现在我们试着从私有Hub去拉下来Images,docker pull 127.0.0.1:5000/vmctestv4:
6、 我们试下利用刚刚pull下来的Imagers创建Container:
7、 这样我们就完成了私有Registry的搭建了
Hey gamers, wanted to share my experience with lc88win. I've been playing here for a bit and the payouts have been legit. Plus, the variety of games keeps things interesting. Check them out at lc88win.
The variety of games here is insane. I spent hours exploring different slots and they are all high quality. pkp998 is where the real action is.
Great selection of games and the VIP perks are actually worth it. I feel like a valued player here. Make sure to check out vnokvip68.
Best experience so far! The bonuses are actually fair and the withdrawal process is smooth as butter. Highly recommend for anyone looking for a reliable site. pkbaji888
Everything from the design to the gameplay is top notch. It is definitely my new favorite spot to relax and play. Visit grenbet88
Really impressed with the game variety here. Everything loads quickly and the customer support is helpful. Give 59ccom a try if you enjoy winning.