This repository provides a Docker-based Odoo development environment with a simple dock helper script for common tasks.
Clone the official Odoo repository into odoo_github/:
git clone -b 17.0 --single-branch --depth 1 https://github.com/odoo/odoo.git odoo_githubYou may add:
- Custom addons
- Enterprise addons
- Third-party modules
Place them inside odoo_github/ or mount them as additional volumes.
Example:
odoo_github/
├── addons
├── odoo
├── enterprise
└── custom_addons
Append all required addon directories to addons_path in your Odoo config:
addons_path =
/opt/odoo/addons,
/opt/odoo/enterprise,
/opt/odoo/custom_addons📍 Default config location:
/etc/odoo/odoo.conf
docker compose builddocker compose up -dVerify services are running:
docker compose psCreate and initialize the database:
./dock --stop-after-init -i web -d odoo✔ Creates database ✔ Installs base modules ✔ Stops Odoo after init
The dock script is a wrapper around odoo-bin inside Docker to simplify common development tasks.
Upgrade a specific module in a database:
./dock --stop-after-init -u <module_name> -d <db_name>Example:
./dock --stop-after-init -u sale -d odooOpen an interactive Odoo shell:
./dock shell -d <db_name>Example:
./dock shell -d odoo./dock -d <db_name>-
The default config file used is:
/etc/odoo/odoo.conf -
You can override it with:
./dock -c /path/to/odoo.conf
-
Database credentials are injected automatically unless overridden.
-
Config changes not applied?
docker compose restart odoo
-
Rebuild after dependency change?
docker compose build --no-cache
- Docker
- Docker Compose (v2)
- Git