我正在尝试使用 docker-maven-plugin(由 spotify 提供:https ://github.com/spotify/docker-maven-plugin )构建一个 docker 映像,但事情并没有真正解决。起初我得到了这个例外:
org.apache.http.conn.HttpHostConnectException: Connect to localhost:2375
我发现我必须创建一个环境。变量来解决这个问题(https://github.com/spotify/docker-maven-plugin/issues/135):
set DOCKER_HOST=set DOCKER_HOST=tcp://192.168.99.100:2376
所以在设置了那个环境之后。变量我不断收到这个 ClientProtocolException:
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.3.258:build (default-cli) on project docker_micro_maven: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: org.apache.http.client.ClientProtocolException: The server failed to respond with a valid HTTP response
我不知道如何解决这个问题,任何输入将不胜感激。