一:win10安装Docker Desktop community【版本:2.2.0.5(43884)】
二:运行Docker Desktop
三:在右下角Docker Desktop图标上右键选择: Switch to Linux containers
四:打开powershell,输入:docker login xxx.xxx.xx:81
输入Harbor上设置的用户和密码,登录成功提示信息如下:
Authenticating with existing credentials...
Stored credentials invalid or expired
Username (admin): admin
Password:
Login Succeeded
五:推送项目至服务器的Harbor
在项目的根目录输入:
mvn clean package dockerfile:build dockerfile:push
推送前需要配置一下:
1、项目POM文件:
2、Maven配置文件settings.xml
找到安装路径:D:\Program Files\JetBrains\IntelliJ IDEA 2018.3.5\plugins\maven\lib\maven3\conf
打开settings.xml
1和2中的密码都是服务器上Harbor的登录密码
来源:oschina
链接:https://my.oschina.net/u/4313604/blog/3274316