解决问题:Win10 Docker打包镜像失败( Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.10)
一、问题描述在Win10家庭版安装Docker成功后,准备将微服务打包Docker镜像执行maven打包命令出错(相关依赖以及必要配置都已配好)二、错误日志[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.10:build (default-cli) on project api-gateway: Coul
·
一、问题描述
在Win10家庭版安装Docker成功后,准备将微服务打包Docker镜像执行maven打包命令出错(相关依赖以及必要配置都已配好)
二、错误日志
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:
1.4.10:build (default-cli) on project api-gateway: Could not build image:
java.util.concurrent.ExecutionException:
com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: com.spotify.docker.client.shaded.org.apache.http.conn.
HttpHostConnectException: Connect to localhost:2375 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1]
failed: Connection refused: connect -> [Help 1]
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.waitForConnect (Native Method)
at java.net.PlainSocketImpl.socketConnect (PlainSocketImpl.java:107)
at java.net.AbstractPlainSocketImpl.doConnect (AbstractPlainSocketImpl.java:399)
at java.net.AbstractPlainSocketImpl.connectToAddress (AbstractPlainSocketImpl.java:242)
at java.net.AbstractPlainSocketImpl.connect (AbstractPlainSocketImpl.java:224)
at java.net.SocksSocketImpl.connect (SocksSocketImpl.java:403)
at java.net.Socket.connect (Socket.java:608)
at com.spotify.docker.client.shaded.org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket (PlainConnectionSocketFactory.java:74)
at com.spotify.docker.client.shaded.org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect (DefaultHttpClientConnectionOperator.java:134)
at com.spotify.docker.client.shaded.org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect (PoolingHttpClientConnectionManager.java:353)
at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.establishRoute (MainClientExec.java:380)
at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.MainClientExec.execute (MainClientExec.java:236)
at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.ProtocolExec.execute (ProtocolExec.java:184)
at com.spotify.docker.client.shaded.org.apache.http.impl.execchain.RetryExec.execute (RetryExec.java:88)
三、解决方案
- 勾选Expose daemon on tcp://localhost:2375 without TLS:将守护进程暴露给tcp:// localhost:2375
之后再次尝试打包,如果还是不行就是其他的问题
更多推荐
已为社区贡献1条内容
所有评论(0)