首页 > 技术文章 > docker push 镜像到 nexus

hanjun0612 2021-08-19 11:51 原文

nexus 安装:https://blog.csdn.net/hanjun0612/article/details/105199191

docker destop 安装:https://blog.csdn.net/hanjun0612/article/details/119798564

一,打开powershell

获取一个 hello-world 镜像

docker run hello-world


二,修改tag

#login  nexusip:port  是你的nexus地址和端口
docker login --username=admin --password="admin" nexusip:port

#修改tag名
#其实这里tag是对的,只是需要前缀namespace
#因此打包前,把<imageName>设置为 docker_hosted/imageName:tag 就可以忽略这一步

docker tag imageID nexus的docker_hosted/hello-world:1.0
#上传
docker push nexus的docker_hosted/hello-world:1.0

 

推荐阅读