com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误正确解决方法
来源:互联网 发布:涤纶网络丝织带 编辑:程序博客网 时间:2024/03/29 23:45
最近学习spring cloud,用到docker maven插件编译的时候遇到了Connection refused的错误。网上搜了很多解决方法都不管用。
运行命令docker-machine env,可以查看docker的相关环境信息,如下图:
有docker的host,path等相关信息,可以看到端口配置并不是2375,只是程序默认的是2375。
这时要对于的在项目的pom文件的docker插件增加配置信息:
<plugin> <groupId>com.spotify</groupId> <artifactId>docker-maven-plugin</artifactId> <version>0.4.13</version> <configuration> <imageName>${docker.image.prefix}/${project.artifactId}</imageName> <dockerDirectory>src/main/docker</dockerDirectory> <!-- 解决Connect to localhost:2375的问题的其中一种方式,注意要跟docker 环境信息相一致 --> <dockerHost>https://192.168.99.100:2376</dockerHost> <dockerCertPath>C:\Users\Administrator\.docker\machine\machines\default</dockerCertPath> <resources> <resource> <targetPath>/</targetPath> <directory>${project.build.directory}</directory> <include>${project.build.finalName}.jar</include> </resource> </resources> </configuration> </plugin>
加上下面两端配置信息,内容要与boot2docker启动的环境信息一致。
<!-- 解决Connect to localhost:2375的问题的其中一种方式,注意要跟docker 环境信息相一致 --><dockerHost>https://192.168.99.100:2376</dockerHost> <dockerCertPath>C:\Users\Administrator\.docker\machine\machines\default</dockerCertPath>
添加完后就可以docker:build成功。
阅读全文
0 0
- com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误正确解决方法
- Failed to com.spotify:docker-maven-plugin:HttpHostConnectException:Connect to localhost:2375
- ssh:connect to host localhost port 22: Connection refused解决方法
- Android中127.0.0.1/localhost connection refused的错误
- android错误 Connection to http://localhost:8080 refused
- 关于android localhost connection refused
- android httpclient localhost Connection refused
- Connection to http://dl-ssl.google.com refused 的解决方法
- Connection to http://dl-ssl.google.com refused 解决方法
- kettle连接sqlserver2005报Connection refused: connect解决方法
- tomcat报错java.net.ConnectException: Connection refused的解决方法
- Django发送邮件报[Errno 111] Connection refused错误
- pymysql链接Mysql数据库报Connection refused的错误
- Connection refused错误
- 在Ubuntu中ssh报错: connect to host localhost port 22: Connection refused 解决办法
- httpURLConnection 报错 java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused
- 报错?!-20170213-ssh: connect to host localhost port 22: Connection refused
- Openstack : 9、报错ToozConnectionError: Error lll connecting to localhost:6379. Connection refused解决办法
- su、sudo命令、限制root远程登陆
- 如何给老婆解释什么是Restful
- mysql无法登录问题
- JS文件无故报错,错误提示为“Syntax error on token "Invalid Regular Expression Options", no accurate correction ”
- NestedScrollView嵌套RecyclerView滑动卡顿解决方案
- com.spotify:docker-maven-plugin 报localhost:2375 Connection refused 错误正确解决方法
- 如何避免成为一个油腻的中年猥琐男
- numpy中shape函数的一些用法
- CSS基础学习
- platform_device的生成过程
- 关于Spring Cloud的核心特性
- 三阶幻方
- c++学习记录17--虚函数和纯虚函数
- openstack手动修改虚拟机状态