docker服务介绍:

http://gitlab.qiyi.domain/docker/docker/blob/master/docs/userguide_ZH-CN/sample.md
http://gitlab.qiyi.domain/docker/docker/blob/master/docs/userguide_ZH-CN/04-usage.md

docker在centos6上安装

http://gitlab.qiyi.domain/docker/docker/blob/master/docs/userguide_ZH-CN/02-installation.md#centos-6

 

基本操作示例:

docker运行机:

e.g.

ibao-web-online004-bjdx

ibao-worker-online002-bjdxt9

1) 下载镜像 (http://dr.qiyi.virtual/repositories/

docker pull docker-registry.qiyi.virtual/library/centos7:7-iqiyi-7

2) 复制镜像 (镜像命名规则:docker-registry.qiyi.virtual/bzsys/what_you_want:version_id)

docker tag docker-registry.qiyi.virtual/library/centos7:7-iqiyi-7 docker-registry.qiyi.virtual/bzsys/centos7:1.0

3) 删除镜像和容器

docker rmi your_tmp_image

docker rm your_container_id

4) 运行镜像

docker run -it docker-registry.qiyi.virtual/bzsys/centos7:1.0 (保留临时容器)

docker run --rm -it docker-registry.qiyi.virtual/bzsys/centos7:1.0 (退出时删除临时容器)

docker run -v "absolute_path_in_local":"absolute_path_in_image" --rm docker-registry.qiyi.virtual/bzsys/centos7:1.0 code_in_image (args) (link inputs and run with an image)

5)升级镜像

docker commit tmp_container_id docker-registry.qiyi.virtual/bzsys/your_image

6) 显示所有镜像

docker images

注释:

1) 镜像命名规则:docker-registry.qiyi.virtual/bzsys/what_you_want:version_id

2) docker-registry.qiyi.virtual/bzsys/centos7:1.0 是安装了tensorflow的镜像

    docker-registry.qiyi.virtual/bzsys/centos7-r321是安装了R的镜像

请勿删除

3) 请经常删除临时的镜像和容器

4) 镜像默认最大尺寸为10G,9G开始会报警,尽量减少镜像尺寸

http://gitlab.qiyi.domain/docker/docker/blob/master/docs/userguide_ZH-CN/04-usage.md#%E9%82%A3%E4%B9%88%E9%97%AE%E9%A2%98%E6%9D%A5%E4%BA%86