Caused by: com.spotify.docker.client.shaded.org.apache.http.ProtocolException: The server failed to

在使用dockerfile-maven-plugin打包镜像可谓是一波三折,和docker-maven-plugin完全不一样,笔者使用的环境又是win7系统,在win7系统上安装的docker toolbox,

             
                 com.spotify
                dockerfile-maven-plugin
                1.3.7
                
                     docker
                    tcuser                    
                    ${docker.repostory}/spring/start
                    ${project.version}
                    true
                    
                      
                         /
                         ${project.build.directory}
                         ${project.build.finalName}.jar
                      

                    
                
                

            

上面的是dockerfile-maven-plugin的配置部分,通过mvn package dockerfile:build一直出现Caused by: com.spotify.docker.client.shaded.org.apache.http.ProtocolException: The server failed to respond with a valid HTTP response这个错误,这个错误是因为通信失败导致的,也就是使用mvn package dockerfile:build进行打包时没有找到tls通信证书导致的,最终解决方法将

C:\Users\当前登录用户\.docker\machine\certs目录下所有文件拷贝到C:\Users\当前登录用户\.docker目录

你可能感兴趣的:(docker)