csphere的支持条件

每台运行docker的主机到控制器所在主机之间的网络必须能够连通

docker版本必须在1.6.0以上

仅支持64位系统,已测试可在以下操作系统下正常运行:

CentOS 7+

Ubuntu 14.04+

Debian 7+

CoreOS

Boot2Docker

虚拟机环境

内网:172.16.1.66

外网:10.0.0.66

1.基础的步骤(查看docker镜像)

[root@oldboy ~]# docker  p_w_picpaths
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
csphere/wordpress   4.2                 04109740355a        11 hours ago        722.7 MB
csphere/mysql       5.5                 63b2bd2cab97        39 hours ago        725.1 MB
csphere/php-fpm     5.4                 38d1572aef94        39 hours ago        685 MB
csphere/centos      7.1                 080063d1c72d        40 hours ago        591.4 MB
jb/jobs03           latest              dd40474b2a4c        2 days ago          1.093 MB
jobs03              latest              dd40474b2a4c        2 days ago          1.093 MB
centos              centos6             273a1eca2d3a        7 days ago          194.6 MB
centos              latest              d83a55af4e75        7 days ago          196.7 MB
registry            latest              ad8da6d14f6d        8 days ago          33.31 MB
centos              6.8                 c51f770ba2ca        5 weeks ago         194.5 MB
centos              centos7.1.1503      0250eeee799f        5 weeks ago         212.1 MB
busybox             latest              b05baf071fd5        6 weeks ago         1.093 MB
registry            0.9.1               bdc26a966725        6 months ago        422.9 MB
[root@oldboy ~]#

2.启动registry容器

[root@oldboy ~]# docker  run -d -p 5000:5000  --name registry registry:0.9.1
e407b8224975bcfe47a93d63b52b8eae164ec7c0abae44d4c546796c99115b00
[root@oldboy ~]# docker  ps -a
CONTAINER ID        IMAGE                   COMMAND                CREATED              STATUS                         PORTS                                   NAMES
e407b8224975        registry:0.9.1          "docker-registry"      About a minute ago   Up 59 seconds                  0.0.0.0:5000->5000/tcp                  registry

3.csphere docker镜像的安装

curl -SsL -o /tmp/csphere-install.sh https://csphere.cn/static/csphere-install-v2.sh
sudo env ROLE=controller CSPHERE_VERSION=1.0.1 /bin/sh /tmp/csphere-install.sh
打tag'
[root@oldboy ~]# docker tag csphere/csphere:1.0.1 172.16.1.66:5000/csphere/csphere:1.0.1

Docker实战之registry持续集成_第1张图片

Docker实战之registry持续集成_第2张图片

Docker实战之registry持续集成_第3张图片

Docker实战之registry持续集成_第4张图片

 add  host  OK 

Docker实战之registry持续集成_第5张图片

Docker实战之registry持续集成_第6张图片

Docker实战之registry持续集成_第7张图片