-
I just spend several hours today merging Basically, I use a lot of different layers to take advantage of buildx's parallel building and to make the best use of the build cache that I can. End result is that I have a bunch of different layers in my final build. Which means I've run into that "max depth exceeded" error message fairly often. Since my web searches haven't dug up a very thorough explanation of the limit yet, I thought I'd ask a few questions here. I'm sure there are good reasons, and would like to understand them. Why is the limit 125 layers? (Yes, the real limit is 128, but Docker reserves a couple of them, right?) What are the downsides of having more layers? Why is the limit not configurable (as far as I can find)? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
This is due to the size of mount options being limited to the page size in the kernel. It is not configurable because that is a hard-coded in your kernel, and it wouldn't be portable even if your kernel supported larger pages. |
Beta Was this translation helpful? Give feedback.
This is due to the size of mount options being limited to the page size in the kernel.
The containerd overlayfs driver does have a workaround for their overlayfs driver but it is not implemented in docker's grpahdrivers.
It is not configurable because that is a hard-coded in your kernel, and it wouldn't be portable even if your kernel supported larger pages.