Skip to content

Provide better diagnostics when building an OCI image fails due to a 500 response from Docker #21515

@lixinchuang

Description

@lixinchuang

today I used the command mvn spring-boot:build-image to build a docker image. but it failed
the error message:

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:build-image (default-cli) on project hotel-common: Execution default-cli of goal org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:build-image failed: Docker API call to 'localhost/v1.24/images/create?fromImage=gcr.io%2Fpaketo-buildpacks%2Fbuilder%3Abase-platform-api-0.3' failed with status code 500 "Internal Server Error" -> [Help 1]

then I checked the docker API version:

 echo -e "GET /info HTTP/1.0\r\n" | sudo nc -U /var/run/docker.sock
HTTP/1.0 200 OK
Api-Version: 1.39
Content-Type: application/json
Docker-Experimental: false
Ostype: linux
Server: Docker/18.09.0 (linux)
Date: Wed, 20 May 2020 07:38:48 GMT

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions