“
用浏览器输入: https://docker.yy.com
或者:curl -i -k https://abc:123@docker.yy.com
”
(4) 使用私有registry步骤:
•登录: docker login -u abc -p 123 -e "test@gmail.com" https://docker.yy.com
•给container起另外一个名字: docker tag centos:centos6 docker.yy.com/centos:centos6
•发布: docker push docker.yy.com/centos:centos6
[X] Server端,操作私有仓库的步骤:
1. 从官方pull下来image!
docker push centos:centos6
2. 查看image的id
执行docker images
输出:
root@pts/0 # docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos centos6 25c5298b1a36 8 days ago 215.8 MB
3. 给image赋予一个私有仓库的tag
docker tag 25c5298b1a36 docker.yy.com/centos:centos6
4. push到私有仓库
docker push docker.yy.com/centos:centos6
5. 查看image
docker images
输出:
root@pts/0 # docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos centos6 25c5298b1a36 8 days ago 215.8 MB
docker.yy.com/centos centos6 25c5298b1a36 8 days ago 215.8 MB
[X] Client端,操作私有仓库的步骤:
1. 从私有仓库pull下来image!
docker pull docker.yy.com/centos:centos6
2. 查看image
docker images
输出:
root@pts/0 # docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.yy.com/centos centos6 25c5298b1a36 8 days ago 215.8 MB
Docker的Web管理界面Shipyard
[0] 编辑/etc/sysconfig/docker文件
在DOCKER_OPTS里添加-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock,例如:
DOCKER_OPTS="-H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --insecure-registry docker.yy.com --tlsverify --tlscacert /etc/pki/CA/cacert.pem --registry-mirror=http://d194d5cb.m.daocloud.io"
[1] Start an data volume instance of RethinkDB:
docker run -it -d --name shipyard-rethinkdb-data --entrypoint /bin/bash shipyard/rethinkdb -l
[2] Start RethinkDB with using the data volume container:
docker run -it -P -d --name shipyard-rethinkdb --volumes-from shipyard-rethinkdb-data shipyard/rethinkdb
“
If your server is directly accessible on Internet,
please note your RethinkDB installation may publicly listen to
ports 49153 (local instance), 49154 (cluster) and 49155 (web interface) and so accessible to all.
”
[3] Start the Shipyard controller:
docker run -it -p 8080:8080 -d --name shipyard --link shipyard-rethinkdb:rethinkdb shipyard/shipyard