docker push 镜像到 nexus

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

 

posted @ 2021-08-19 11:51  正怒月神  阅读(497)  评论(0编辑  收藏  举报