Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paketo jammy-full builder release v0.3.388 fails with Docker error "max depth exceeded" #556

Open
outcomes-michael-pinnegar opened this issue Jul 29, 2024 · 4 comments

Comments

@outcomes-michael-pinnegar

Release v0.3.388 causes our CI build to fail with a "max depth exceeded" error from Docker. Docker has a hard, fixed limit of 127 layers. You can't have more than that. Release v0.3.387 does NOT produce that error.

I believe this issue just started cropping up because builder-jammy-full/0.3.386 and 0.3.387 had 114 layers, latest (0.3.388) has 121 layers. Basically you only have 6 more layers of overhead before hitting the hard limit set by docker. I don't know why or how Paketo seems to be modifying the number of layers in the builder image, but apparently it does, because the failure is sensitive to the layer count in the builder image.

Expected Behavior

Build should proceed normally

Current Behavior

Digest: sha256:858f4b789918283d33a5885d3c8f56be9b3c581e61fa76158b52e1c7d5eb758f
Status: Downloaded newer image for paketobuildpacks/builder-jammy-full:latest
ERROR: failed to build: failed to write image to the following tags: [pack.local/builder/66776672666266706164:latest: loading image "pack.local/builder/66776672666266706164:latest". first error: embedded daemon response: max depth exceeded]

Possible Solution

Reduce the number of layers in the produced full-jammy docker image. A simple way to do this is to reduce the number of commands in your layers, and I believe Multistage builds is a more advanced way to shrink the number of layers, but I haven't used it before.

Steps to Reproduce

Run pack build image_name:1.0.0 --env 'BP_EMBED_CERTS=true' --env 'BP_RUNTIME_CERT_BINDING_DISABLED=true' --publish --post-buildpack paketobuildpacks/elastic-apm:latest

I actually haven't tried to reproduce this outside of our CI environment, but this is the command that it runs that fails. I assume that paketo is doing something that adds more layers to the image before it attempts to use it to build.

Motivations

CI build process does not work with the jammy full builder.

@1FastSTi
Copy link

We too are getting the same error

@outcomes-michael-pinnegar outcomes-michael-pinnegar changed the title Paketo jammy-full builder release v0.3.387 fails with Docker error "max depth exceeded" Paketo jammy-full builder release v0.3.388 fails with Docker error "max depth exceeded" Jul 29, 2024
@jsandov
Copy link

jsandov commented Jul 31, 2024

@1FastSTi @outcomes-michael-pinnegar

I can build locally and in the CI using the following release:
paketobuildpacks/builder-jammy-full:0.3.387

The following releases will still produce the same error:

0.3.389
0.3.388

@sebastianplawner
Copy link

Same here. Had to fix the builder version to 0.3.387 or it won't work.

@taraszka
Copy link

Feel free to use https://github.com/migetapp/builder-ubuntu22-full, a squashed image that is binary compatible with paketobuildpacks/builder-jammy-full.
The builder is monitored via GitHub Actions, which checks for new releases of builder-jammy-full every 10 minutes and automatically triggers a new build whenever a new release is detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants