天天看点

访问Docker仓库

查找镜像

docker search centos      

下载镜像

docker pull centos      
搭建私有仓库
docker run -d -p 5000:5000 registry      

放到指定目录 /opt/data/registry

docker run -d -p 5000:5000 -v /opt/data/registry:/tmp/registry  registry      

给镜像打标签

docker tag ubuntu:latest 192.168.1.145:5000/test      

关闭仓库校验(配置文件修改配置,要重启docker)

DOCKER_OPTS="--insecure-registry=192.168.1.145:5000"      

镜像上传

docker push 192.168.1.145:5000/test      

继续阅读