Odoo development on Docker

I’m trying to use docker for odoo module developement. I have the following docker-compose.yml file

  image: postgres
    - data:/var/lib/postgresql/data/

  image: odoo
    - db:db
    - ""
    - extra-addons:/mnt/extra-addons
  command: -- --update=tutorial

The module contains only an __openerp__.py file but odoo doesn’t show the changes I make to it even with --update=tutorial option

  • Running multi-node kubernetes using docker
  • Mounting Azure File Storage in Docker container via Kubernetes
  • Docker machine unable to start the remote machine
  • Where's docker's deamon.json? (missing)
  • How to set a path on host for a named volume in docker-compose.yml
  • Docker and git deployment workflow confusion
  • {
        'name': "tutorial",
        'summary': """Hello world!!""",
        'description': """
            This is the new description
        'author': "ybouhjira",
        'website': "ybouhjira.com",
        'category': 'Technical Settings',
        'version': '0.1',
        'depends': ["base"],

    this file is in a folder named tutorial located in extra-addons, and I tried stop and starting the containers even removing and recreating them.

  • Can not connect to websocket using django-channels , nginx on docker as services
  • create file in shared folder docker container
  • Limit Network access but allow a specific IP for a Running Docker Container
  • Docker container restart in Docker Swarm Cluster
  • What are the pros and cons of docker pull and docker build from Dockerfile?
  • How can JVMs running inside Bluemix container groups be monitored?
  • 4 Solutions collect form web for “Odoo development on Docker”

    Like shodowsjedi already said, you need to create a __init__.py file (see module structure : https://www.odoo.com/documentation/8.0/howtos/backend.html#module-structure ).

    Also, check permissions in your odoo containers, your files in the odoo volume will have uid and gid of your system (the host) in the container (that can be associated to a different user). To check this you can use docker exec :

    docker exec docker_odoo_1 ls -la /mnt/extra-addons

    If you don’t know the docker name of your container you can retrieve it by using :

    docker-compose ps

    Last and probably the most important one, check odoo logs by using :

    docker-compose logs

    and update your module in the configuration page of Odoo (or at the startup of the server)

    To create new module you need more then Odoo Manifest file __openerp__.py file you also need Python Descriptor file __init__.py as minimal structure, of course you need more then two file but that minimal to module to exists. Once you create a module on existing database you need call Update module List under setting to load your module correctly and then you will be able to install it.

    • Here the quick guide on module creation.
    • Here the Detail Guide on API and framework.

    The --update option requires -d specifying the database name
    Odoo CLI doc

    You have to add own config file. first in docker-compose.yml mount /etc/odoo

     image: odoo
      - db:db
      - ""
      - extra-addons:/mnt/extra-addons
      - ./config:/etc/odoo

    Then create “odoo.conf” in ./config and add configuration options like below.

    addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist- packages/odoo/addons
    data_dir = /var/lib/odoo
    auto_reload = True

    restart odoo, go to debug mode then apps->update module list

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.