gpt4 book ai didi

maven - Docker maven插件make {}-> unix://localhost:80:管道损坏

转载 作者:行者123 更新时间:2023-12-02 19:32:24 24 4
gpt4 key购买 nike

我使用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

我怎么解决这个问题。

最佳答案

检查$ {project.artifactId}名称。它包含大写单词。“Eureka”
它会为您带来错误。

[INFO] Image will be built as springio/cloud-microservice-projet-Eureka:latest

将其更改为 cloud-microservice-projet-eureka
这里的问题是图像名称,用大写字母表示, docker 不允许图像名称带有大写字母

关于maven - Docker maven插件make {}-> unix://localhost:80:管道损坏,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49901574/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com