I’m new using microservers architecture and I decided to create a POC (Proof Of Concept) by using SpringBoot in a Docker environment.
I was following a tutorial, but when I decided to build the image by using the maven command:
mvn spring-boot:build-image -Dspring-boot.build-image.imageName=<my image name>
I got a pretty non sense message error:
failed to copy: httpReadSeeker: failed open: failed to do request: Get “https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/cd/cd6341ae2353f47f9ee9915e00467fc0a01ae4cfb69ad87b7807cdbfc2775d0d/data?verify=1727170525-qUQf9SZRuFS6VKMog0CqWwTmawk%3D”: EOF
Why this happens?
Theese are the versions for the tools I’m using:
- java: 22
- spring-boot: 3.3.4
- docker-desktop: 4.33.1
I expected to create a docker image I could use in a docker-compose configuration or standalone docker container.
I think I found out a solution.
Seems to be the image (paketobuildpacks/builder-jammy-base:latest) which spring-boot uses is large enough to cause network traffic troubles (2GB).
I tried:
docker pull paketobuildpacks/builder-jammy-base:latest
And I got the same error than trying to build the image with spring-boot maven plugin.
So instead of that, navigating through the web looking for a solution I found another image close in name: paketobuildpacks/builder-jammy-
tiny:latest.
I pulled it by:
docker pull paketobuildpacks/builder-jammy-tiny:latest
And because it shares same layers than the previous one, now I could finally pull the previous one:
docker pull paketobuildpacks/builder-jammy-base:latest
And even:
mvn spring-boot:build-image -Dspring-boot.build-image.imageName=XXXX
Worked.
I hope this could help anybody.