[英]Spring spring-boot:build-image gives HTTP 500 error
I'm trying to containerize a simple spring boot app with a hello world rest service( initialized from spring-inializer site).I have installed in my local environment Docker Desktop for Windows with Kube.netes enabled.我正在尝试使用 hello world rest 服务(从 spring-initializer 站点初始化)将一个简单的 spring 启动应用程序容器化。我已经在我的本地环境中安装了 Docker 桌面 Windows 并启用了 Kube.netes。 Output from docker version:
Output 来自 docker 版本:
Cloud integration: v1.0.23
Version: 20.10.14
API version: 1.41
Go version: go1.16.15
Git commit: a224086
Built: Thu Mar 24 01:53:11 2022
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Desktop 4.7.1 (77678)
Engine:
Version: 20.10.14
API version: 1.41 (minimum version 1.12)
Go version: go1.16.15
Git commit: 87a90dc
Built: Thu Mar 24 01:46:14 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.5.11
GitCommit: 3df54a852345ae127d1fa3092b95168e4a88e2f8
runc:
Version: 1.0.3
GitCommit: v1.0.3-0-gf46b6ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Pom.xml content: pom.xml内容:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.13</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>rest-service-complete</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>rest-service-complete</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${project.parent.version}</version>
</plugin>
</plugins>
</build>
</project>
When I execute the command to build/run image ./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=springio/rest-complete-service
I get bellow error: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.13:build-image (default-cli) on project rest-service-complete: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.5.13:build-image failed: Docker API call to 'localhost/v1.24/images/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase' failed with status code 500 "Internal Server Error" and message "received unexpected HTTP status: 500 Server Error" -> [Help 1]
当我执行构建/运行图像的命令时
./mvnw spring-boot:build-image -Dspring-boot.build-image.imageName=springio/rest-complete-service
我收到以下错误: [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.5.13:build-image (default-cli) on project rest-service-complete: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.5.13:build-image failed: Docker API call to 'localhost/v1.24/images/create?fromImage=docker.io%2Fpaketobuildpacks%2Fbuilder%3Abase' failed with status code 500 "Internal Server Error" and message "received unexpected HTTP status: 500 Server Error" -> [Help 1]
Would appreciate any ideas to get past this.将不胜感激任何想法来解决这个问题。
I found a similar post to yours, as they state there, this is actually a docker daemon error, so you would need to check docker daemon logs for any relevant information.我发现了一个与您类似的帖子,因为他们 state 在那里,这实际上是一个 docker 守护程序错误,因此您需要检查 docker守护程序日志以获取任何相关信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.