- 查找镜像
1、docker Hub网站
https://registry.hub.docker.com
2、命令行查找
docker search [options] term
--automated=false#只会显示自动构建
--no-trunc=false#不易截断的方式
-s,--stars=0 #显示的最低星级
#最多返回25个结果
- 拉取镜像
docker pull [options] name [:tag]
-a,--all-tags=false#可以下载匹配的所有镜像
docker pull ubuntu:14.04
docker images
使用国内镜像服务器
~~ 使用–registry-mirror选项:
- 修改:/etc/default/docker
- 添加:DOCKER_OPTS="–registry-mirror=http://MIRROR-ADDR"
http://www.daocloud.io注册并得到MIRROR-ADDR地址~~
#运行此代码错误
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://f1361db2.m.daocloud.io
- 推送镜像
docker push NAME[:TAG]
docker push dockerHub用户/nginx
#登录此dockerHub用户
#推送至用户