yywx001 发表于 2018-5-27 08:56:51

docker 搭建registry私有仓库 (Centos6.5)

  

  docker仓库:192.168.47.129

  客户端:192.168.47.128
  查看客户端ip

  查看docker仓库ip

  在docker仓库上查看本地镜像,如图,只有一个之前pull的centos镜像

  pull registry镜像

  查看本地镜像,registry镜像已经成功下载

  添加防火墙规则

  启动registry镜像并将其/tmp/registry挂载到docker仓库中/opt/registry上

  打开客户端(192.168.47.128),修改docker配置文件,解决https问题
  添加 other_args='--insecure-registry 192.168.47.129:5000'
  客户端添加私有仓库地址
  添加 ADD_REGISTRY='--add-registry 192.168.47.129:5000'
  修改后如图所示


  重启docker服务

  为了测试再pull一个hello-world镜像

  为hello-world打上一个tag

  客户端push测试

  为centos打上tag并push测试

  查看客户端本地镜像

  删除centos和hello-world镜像

  删除完毕,本地没有镜像

  客户端pull hello-world镜像测试

  客户端pull centos测试

  查看客户端本地镜像

  

  
页: [1]
查看完整版本: docker 搭建registry私有仓库 (Centos6.5)