samsungsamsung 发表于 2015-4-18 07:42:54

CentOS7安装Docker registry

  1、使用fedora 20(IP为192.168.1.103)作为测试服务器(centos 7,redhat 7通用)
  
  2、安装docker



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]yum -y install docker docker-registry
  特别说明,fedora更新的docker 1.3.1提交到本地库有问题,有1.3.0的docker没问题。若以后再更新版本,按照上面的操作



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]yum -y install http://mirrors.163.com/fedora/updates/20/x86_64/docker-io-1.3.0-1.fc20.x86_64.rpm
  
  3、启动并保持开机启动,安装docker registry



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]systemctl start docker
[*]systemctl start docker-registry
[*]systemctl enable docker
[*]systemctl enable docker-registry
  



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker run -p 5000:5000 registry
  
  4、在线下载centos镜像



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker pull centos
  下载完成后执行



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker images
  
  5、将镜像做tag



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker tag img_id localhost.localdomain:5000/centos_local
  

  6、push镜像到本地库



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker push localhost.localdomain:5000/centos_local   
  


  7、客户端下载这个私服的镜像



Java代码 http://wiselyman.iteye.com/javascripts/syntaxhighlighter/clipboard_new.swf
[*]docker pull 192.168.1.103:5000/centos_local
  


  10、大功告成
页: [1]
查看完整版本: CentOS7安装Docker registry