The base images does nothing alone, it only contains the dependencies and a few tools, but you need to create an inheriting image with the odoo and addons code.
Follow the steps:
-
Create directories. This is mandatory, they will be copied in the image
mkdir -p odoo/addons data songs
-
Add a submodule for Odoo (official or OCA/OCB)
git submodule init git submodule add [email protected]:odoo/odoo.git odoo/src
-
Optionally add submodules for external addons in
odoo/external-src
git submodule add [email protected]:OCA/server-tools.git odoo/external-src/server-tools
-
Optionally add custom addons in
odoo/addons
-
Create the Dockerfile, the bare minimum being (see also the example file that installs additional dependencies):
FROM camptocamp/odoo-project:11.0 MAINTAINER <name> ENV ADDONS_PATH=/odoo/odoo/addons,/odoo/external-src/server-tools,/odoo/src/odoo/addons
-
Build your image
docker build -t youruser/odoo-project-example .
-
Optionally create a docker-compose.yml file. This example is a development composition.