Hello everyone,
I'm facing an issue while restoring a database in Odoo 18 using Docker, and I’d like to share the full context since it might help others encountering similar problems.
Errors encountered
When starting the container, I get two types of errors:
- Docker error:
max depth exceeded
- Odoo error:
ModuleNotFoundError: No module named 'odoo.addons.spreadsheet.controllers'
I am using Docker with the following command:
docker compose up --build -d
And the image defined in docker-compose.yml is:
image: odoo:18.0
After investigating, I identified two separate issues:
The current odoo:18.0 image has more than 128 layers (in my case, 129+).
This exceeds the practical limit of the default Docker storage driver (overlay2), causing the container to fail with:
max depth exceeded
You can verify the number of layers with:
docker image inspect odoo:18.0 --format '{{len .RootFS.Layers}}'After restoring the database, Odoo tries to load the enterprise module spreadsheet_edition, which depends on the base module spreadsheet.
However, this module is not available in the current environment, resulting in:
No module named 'odoo.addons.spreadsheet.controllers'
The main issue comes from using:
odoo:18.0
This is a floating tag, meaning it always points to the latest available image.
Recently, the image was updated and now includes more layers, exceeding the overlay2 limit.
- Use a fixed image version (recommended):
image: odoo:18.0-YYYYMMDD
or use a digest:
image: odoo@sha256:...
- Avoid relying on the floating 18.0 tag
- Alternatively, switch the Docker storage driver (e.g., fuse-overlayfs)
- Ensure that enterprise and community modules are aligned with the restored database
This issue can happen unexpectedly, even without changing any code, simply due to automatic updates of the Docker image.
It may affect other users running Odoo 18 with Docker and overlay2.
If anyone has encountered this or has additional recommendations, I’d really appreciate your input.
Thanks!