spring-attic / top-spring-boot-docker

Spring Boot Docker:: Topical guide to using Docker and how to create container images for Spring Boot applications :: spring-boot
https://spring.io/guides/topicals/spring-boot-docker
180 stars 127 forks source link

Docker API 500 error when using bootBuildImage's builder property instead of imageName #9

Closed CoderPraBhu closed 4 years ago

CoderPraBhu commented 4 years ago

Following sample of topical guide needs update.

You can modify the image name in Maven using maven sample code block and in Gradle using:

bootBuildImage {
    builder = "myorg/demo"
}

It should be updated to:

bootBuildImage {
    imageName = "myorg/demo"
}

If not fixed, it causes following error:

Docker API call to 'localhost/v1.24/images/create?fromImage=gcr.io%2Fprojectid%2Fprojectname%3Alatest' failed with status code 500 "Internal Server Error"

Caused by: org.springframework.boot.buildpack.platform.docker.transport.DockerEngineException: Docker API call to 'localhost/v1.24/images/create?fromImage=gcr.io%2Fprojectid%2Fprojectname%3Alatest' failed with status code 500 "Internal Server Error"
    at org.springframework.boot.buildpack.platform.docker.transport.HttpClientTransport.execute(HttpClientTransport.java:135)

Similar error is reported in Spring boot Issue 21515

CoderPraBhu commented 4 years ago

Just noticed that there's already a PR to fix this issue. Closing the issue. https://github.com/spring-guides/top-spring-boot-docker/pull/8