1.更新系统:

yum update -y

2. 安装docker-compos

yum -y install epel-release    #pip安装包在epel源中
   yum -y install python-pip
   pip install -U docker-compose

3.安装git客户端

yum install -y git

4.复制Portus安装程序

git clone https://github.com/SUSE/Portus.git

5.配置Docker安装源

  vi /etc/yum.repos.d/docker.repo
    [dockerrepo]
     name=Docker Repository
    baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
    enabled=1
    gpgcheck=1
    gpgkey=
    https://yum.dockerproject.org/gpg

6.安装docker引擎并启动

   yum cleal all && yum makecache
  yum install -y docker-engine
  systemctl start docker.service
  systemctl enable docker.service

此步如果有保存,请参考下面链接的地址:

http://www.cnblogs.com/amoyzhu/p/5261393.html

7. 安装Portus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
./compose-setup.sh -e 192.168.0.109
#安装过程中会下载registry、mariadb、rails、ports_web等几个docker镜像
#如果网络不好可以先下载对应的几个docker镜像文件
#然后上传到portus服务器上并用docker load命令加载。
#镜像的具体版本号以实际为准。
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
portus_web          latest              24a654206d8b        2 days ago          1.086 GB
registry            2.3.1               83139345d017        4 months ago        165.8 MB
mariadb             10.0.23             93631b528e67        5 months ago        304.6 MB
rails               4.2.2               99b347e4bbb4        13 months ago       884.5 MB
安装过后会给出相应的登陆信息和客户端需要的操作样例
###################
#     SUCCESS     #
###################

Make sure port 3000 and 5000 are open on host 192.168.0.109

Open http://192.168.0.109:3000 with your browser and perform the following steps:

1. Create an admin account
  2. You will be redirected to a page where you have to register the registry. In this form:
    - Choose a custom name for the registry.
    - Enter 192.168.0.109:5000 as the hostname.
    - Do *not* check the "Use SSL" checkbox, since this setup is not using SSL.

Perform the following actions on the docker hosts that need to interact with your registry:

- Ensure the docker daemon is started with the '--insecure-registry 192.168.0.109:5000'
  - Perform the docker login.

To authenticate against your registry using the docker cli do:

$ docker login -u <portus username> -p <password> -e <email> 192.168.0.109:5000

To push an image to the private registry:

$ docker pull busybox
  $ docker tag busybox 192.168.0.109:5000/<username>busybox
  $ docker push 192.168.0.109:5000/<username>busybox

8、打开防火墙端口

1
2
3
firewall-cmd --zone=public  --add-port=3000/tcp --permanent
firewall-cmd --zone=public  --add-port=5000/tcp --permanent
systemctl restart firewall.service

9. Portus初始化



 
连接到本docker仓库(也可以是其他仓库,必须是registry 2.0以上版本)
<ignore_js_op> 
10、上传镜像测试
修改文件/lib/systemd/system/docker.service中的ExecStart增加--insecure-registry 192.168.0.109:5000并重启docker服务

1
2
systemctl daemon-reload
systemctl restart docker.service

检查docker服务

1
2
# ps -ef|grep insecure-registry
root     29486     1  0 01:32 ?        00:00:00 /usr/bin/dockerd --insecure-registry 192.168.0.109:5000

11. 重启Portus容器:

docker start portus_db_1 portus_web_1 portus_crono_1 portus_registry_1

12.下载busybox镜像并上传到私有的仓库中(安装结束时有操作提示)

docker pull busybox

从docker官网上下载busybox镜像到本地

docker tag busybox 192.168.0.109:5000/admin/busybox

把刚下载的镜像busybox打上tag(重命名):192.168.0.109:5000/admin/busybox

docker login -u admin -p admin123 192.168.0.109:5000

登陆私有的镜像仓库

docker push 192.168.0.109:5000/admin/busybox

把本地的tag为192.168.0.109:5000/admin/busybox上传到私有仓库。

检查Portus界面的镜像信息
 

13.下载镜像测试

docker pull 192.168.0.109:5000/admin/busybox

  

Docker仓库搭建(Registry + Portus)的更多相关文章

  1. Docker 之registry私有仓库搭建

    Docker 之registry私有仓库搭建 官方提供的私有仓库docker registry用法 https://yeasy.gitbooks.io/docker_practice/reposito ...

  2. 6.云原生之Docker容器Registry私有镜像仓库搭建实践

    转载自:https://www.bilibili.com/read/cv15219863/?from=readlist #1.下载registry仓库并设置数据存放的目录(并生成认证账号密码) doc ...

  3. docker简单介绍---部署私有docker仓库Registry

    1. 关于Registry 官方的Docker hub是一个用于管理公共镜像的好地方,我们可以在上面找到我们想要的镜像,也可以把我们自己的镜像推送上去.但是,有时候,我们的使用场景需要我们拥有一个私有 ...

  4. 为docker私有registry配置nginx反向代理

    公司的Docker私有registry已经搭建好了,用官方的registry image很容易就搭建好了.现在就是要用nginx的反向代理把它放出来,以便在外网可以访问. 我的上一篇blog 讲了如何 ...

  5. docker 仓库搭建

    阿里云服务器: 127.0.0.1(客户端) 127.0.0.2(私有服务器) 127.0.0.2作为私有仓库使用 1.下载镜像 [root@insure ~]# docker pull regist ...

  6. 解决: docker pull registry.access.redhat.com/rhel7/pod-infrastructure:latest

    直接获取 rpm文件 wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-rhsm-certificates-1.19.1 ...

  7. Docker部署Registry私有镜像库

    拉取镜像 docker pull registry:2.6.2   生成账号密码文件,这里采用htpasswd方式认证 docker run --rm --entrypoint htpasswd re ...

  8. docker私服registry管理镜像

    前言 首先试想这样一个场景:当在自己的机器上(docker中)构建了mysql镜像,eureka镜像等等微服务镜像,这些镜像有可能需要放到其他的机器上docker环境中去运行,实行分布式架构部署.但如 ...

  9. docker 私有registry 配置

    备注:此处使用linux镜像配置仓库 registry 启动步骤 https://hub.docker.com/_/registry/ docker login docker pull registr ...

随机推荐

  1. 基于word制作网站webhelp

    处理问题描述:现在我有个javaweb项目,需要在portal上面点击help即可打开: 当前搜索百度(谷歌不能用了),没有找到更好的解决方案,自己想了个比较简单实用的方法,仅供参考: 设计原理:利用 ...

  2. Netsharp快速入门(之10) 销售管理(插件、资源、业务建模)

    作者:秋时 杨昶   时间:2014-02-15  转载须说明出处 第4章     销售模块开发 4.1     创建插件和资源 参考基础档案的开发 4.2     创建业务模型 Netsharp工具 ...

  3. Microsoft SQL Server 存储过程举例

    -- if SP is existed, drop it. if (object_id('InvHoldToDPS', 'P') is not null) drop proc InvHoldToDPS ...

  4. 我是IT小小鸟

    我是IT小小鸟读后感 世界上没有一蹴而就的成功者,只有头悬梁锥刺股的奋斗者.蜉蝣向往大鹏的辉煌,却不曾知大鹏以往的汗水.蜉蝣之所以为蜉蝣,是因为它犹如井底之蛙,目光短浅,之盲目地羡慕成功者,而大鹏之所 ...

  5. 【CentOS】cp显示进度条

    问题描述: 使用CentOS的cp时,对于大文件的拷贝或者mv,需要等待很长时间,现在需要显示cp或mv的进度 问题解决: Advanced copy 参考官网:http://beatex.org/w ...

  6. Leetcode#140 Word Break II

    原题地址 动态规划题 令s[i..j]表示下标从i到j的子串,它的所有分割情况用words[i]表示 假设s[0..i]的所有分割情况words[i]已知.则s[0..i+1]的分割情况words[i ...

  7. navigationController.navigationBar.titleTextAttributes

    navigationController.navigationBar.titleTextAttributes = [NSDictionary dictionaryWithObject:[UIColor ...

  8. 关灯问题 dp

    题意是一排路灯,每个路灯有耗电量,照明度,需要给这n个路灯按顺序分组,每组内的最大耗电量是电灯数乘t,可以选择关闭一些电灯,求最大的照明度: 这题思路很明显,预处理出一个g[i][j]表示i到j分为一 ...

  9. 系统使用 aspose.cell , 使得ashx第一次访问会变很慢

      网站放在IIS后, 在网站第一次访问后.  回收应用程序池 第一次访问aspx页面还是比较快.   但第一次访问ashx会很慢.   后发现原因: aspose.cell的5.3...版本. 的原 ...

  10. html之colspan && rowspan讲解

    1.colspan && rowspan均在td标签中使用 2.每个单元格大小一致的前提 <table border="1" bordercolor=&quo ...