Version:
All docker versionsError:
When attempting to launch a workspace you are presented with this error: “failed to register layer: max depth exceeded” in the logs. The error is also visible on the describe of a new pod (Under Events)Cause:
Docker images consist of stacked layers. Each instruction in a Dockerfile creates one new layer. When using the overlay2 storage driver, Docker enforces a maximum of 127 layers per image. This error occurs when your image exceeds that limit. Note that the base image your compute environment builds on may already use many layers. Your own Dockerfile instructions stack on top of those existing layers.Resolution:
Reduce the total number of layers in your Dockerfile. The most effective approaches are combining multipleRUN instructions and using multi-stage builds.
1. Combine RUN instructions
Each separateRUN instruction creates a new layer. Combine related commands into a single RUN instruction using &&. Install all packages in one step:
2. Use multi-stage builds
If your build process requires multiple tools, use multi-stage builds. Build artifacts in one stage, then copy only what you need into the final image. This avoids carrying intermediate layers into the final image:3. Create a new compute environment
If your layer count still exceeds 127 after combining instructions, the base image itself may account for too many layers. In that case, create a new compute environment in Domino and copy your existing Dockerfile instructions into it, confirming the total layer count stays within the 127-layer limit. For help editing Dockerfile instructions in a Domino compute environment, see Use Dockerfile instructions.Additional resources
- Dockerfile best practices — guidance on reducing layers and optimizing image size
- Dockerfile reference — full reference for all Dockerfile instructions