Exception caught: Request error: POST unix://localhost:80/build?t=docker/image: 500:

使用spotify 插件 把springboot打包成docker镜像 ,出现

Failed to execute goal com.spotify:docker-maven-plugin:0.4.13:build (default) on project springboot-docker: Exception caught: Request error: POST unix://localhost:80/build?t=ahsj/xxxxx/springboot-docker: 500: HTTP 500 Internal Server Error -> [Help 1]我
然后提示错误参考是
http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

注:这个情况的原因就是Dockerfile 文件命名不规范 如果你是DockerFile 驼峰的,那么就百分百出这个错

Exception caught: Request error: POST unix://localhost:80/build?t=docker/image: 500:_第1张图片



还有一种错误就是

 I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Broken pipe

导致这个错误的原因是 project.artifactId 可能包含了大写

1.${docker.image.prefix}/${project.artifactId}

 

下面是我故意演示

Exception caught: Request error: POST unix://localhost:80/build?t=docker/image: 500:_第2张图片

把大小写问题,跟docker文件名称改好后,然后进行打包

Exception caught: Request error: POST unix://localhost:80/build?t=docker/image: 500:_第3张图片

打包成功

Exception caught: Request error: POST unix://localhost:80/build?t=docker/image: 500:_第4张图片

你可能感兴趣的:(docker)