# 登录 [root@VM_0_16_centos harbor]# docker login 122.51.23.194 Username: admin Password: Harbor12345 WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded [root@VM_0_16_centos harbor]#
#上传至公开库 docker tag nginx:latest 122.51.23.194/nateshao-pub/nginx:0.0.1 docker push 122.51.23.194/nateshao-pub/nginx:0.0.1 #上传至私有库 [root@VM_0_16_centos harbor]# docker tag mysql 122.51.23.194/nateshao-private/mysql:0.0.1 [root@VM_0_16_centos harbor]# docker push 122.51.23.194/nateshao-private/mysql:0.0.1 The push refers to repository [122.51.23.194/nateshao-private/mysql]