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

  • DockerHub set tag alias in automated build
  • in ssh shell script check for docker version
  • Docker --env-file - executable file not found in $PATH
  • Getting a “A blocking operation was interrupted by a call to WSACancelBlockingCall” error when consuming Shipyard API using RestSharp
  • Deploy a docker image from a registry with basic auth
  • add new GPG key detailed in Docker installation
  • {
        '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.

  • Requests hanging on ports forwarded from docker container inside vagrant
  • Build container with docker-compose, but run /etc/bash with -it option later?
  • Docker/CI: Get access to nodeJS app, which is created in another stage
  • Docker: Where to store version of multiple images for docker-compose?
  • Docker ping container on other nodes
  • How to run provision.sh on vagrant with docker provider
  • 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.