新版本的nexus3 可以进行docker 镜像的存储处理
一、配置私有镜像(host 模式)
二、在服务器主机上,修改docker 非安全镜像处理
vim /etc/docker/daemon.json
{
"registry-mirrors": ["http://099430a4.m.daocloud.io"],
"insecure-registries":["hostip:5000"]
}
重启docker服务
systemctl restart docker
三、push image
我们先下载nginx镜像,修改标签,然后推送,前缀必须加上主机ip:端口
docker pull nginx
docker tag nginx hostip:5000/nginx-v1
docker push hostip:5000/nginx-v1
四、push image
首先要在主机上登录到镜像仓库nexus3,完成身份验证
docker push hostip:5000/nginx-v1