gpt4 book ai didi

docker - 无法使用 spotify 插件构建 Docker 镜像

转载 作者:行者123 更新时间:2023-12-02 20:50:41 29 4
gpt4 key购买 nike

我一直在使用 spotify 插件来构建 docker 镜像,但是由于某种原因它突然停止工作,并且它吐出错误,提示 exec 失败在 spotify 插件上

[INFO] 
[INFO] --- maven-jar-plugin:2.5:jar (default-jar) @ SimpleWebApp ---
[INFO] Building jar: /home/test/opd_workspace/my_simple_webapp/target/SimpleWebApp-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.3.5.RELEASE:repackage (default) @ SimpleWebApp ---
[INFO]
[INFO] --- docker-maven-plugin:0.2.3:build (default-cli) @ SimpleWebApp ---
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Copying /home/test/opd_workspace/my_simple_webapp/target/SimpleWebApp-0.0.1-SNAPSHOT.jar -> /home/test/opd_workspace/my_simple_webapp/target/docker/SimpleWebApp-0.0.1-SNAPSHOT.jar
[INFO] Copying src/main/docker/Dockerfile -> /home/test/opd_workspace/my_simple_webapp/target/docker/Dockerfile
[INFO] Building image imgprefix/SimpleWebApp
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.282s
[INFO] Finished at: Wed Jun 01 19:42:14 EDT 2016
[INFO] Final Memory: 27M/340M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (default-cli) on project SimpleWebApp: Exception caught: Request error: POST unix://localhost:80/v1.12/build?t=imgprefix/SimpleWebApp: 500: HTTP 500 Internal Server Error -> [Help 1]

我的pom.xml插件很简单,maven项目构建打包就ok了
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.2.3</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>

最佳答案

跟随这条线:

[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (default-cli) on project SimpleWebApp: Exception caught: Request error: POST unix://localhost:80/v1.12/build?t=imgprefix/SimpleWebApp: 500: HTTP 500 Internal Server Error -> [Help 1]

看来您正在使用 UNIX作为操作系统和 Docker回答你一个错误 500。

我正在使用 MACOS并且它与您的配置相同,但在我需要评估之前非常适合我 Docker我的终端中的环境变量:
eval $(docker-machine env default)

关于docker - 无法使用 spotify 插件构建 Docker 镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37580623/

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