我使用 spring-boot 实现应用程序并尝试使用这个 mvn 插件构建 docker 映像。
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.3.6</version>
<executions>
<execution>
<id>default</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<!-- <goal>push</goal> -->
</goals>
</execution>
</executions>
<configuration>
<repository>${docker.image.prefix}/${project.artifactId}</repository>
<buildArgs>
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
</buildArgs>
</configuration>
</plugin>
如果我尝试使用 mvn clean install 构建它,它会出现以下错误。
Caused by: java.io.IOException: Broken pipe
at jnr.enxio.channels.NativeSocketChannel.write(NativeSocketChannel.java:93)
at java.nio.channels.Channels.writeFullyImpl(Channels.java:78)
at java.nio.channels.Channels.writeFully(Channels.java:98)
at java.nio.channels.Channels.access$000(Channels.java:61)
at java.nio.channels.Channels$1.write(Channels.java:174)
at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:124)
at org.apache.http.impl.io.SessionOutputBufferImpl.flushBuffer(SessionOutputBufferImpl.java:136)
at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:167)
at ……………………..
org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:179)
at
[INFO] Building Docker context /Users/thamira/ProjectFolder/finalresearch/cloud-microservice-projet-eureka
[INFO]
[INFO] Image will be built as springio/cloud-microservice-projet-Eureka:latest
[INFO]
Apr 18, 2018 6:56:20 PM org.apache.http.impl.execchain.RetryExec execute
INFO: I/O exception (java.io.IOException) caught when processing request to {}->unix://localhost:80: Broken pipe
我怎么解决这个问题。