Public | Automated Build

Last pushed: 17 hours ago
Short Description
A dockerized Odoo v7, v8 or v9alpha (formerly OpenERP)
Full Description

A production-ready image for Odoo 7 & 8 & 9alpha

This image weighs just over 1Gb. Keep in mind that Odoo is a very extensive suite of business applications written in Python. We designed this image with built-in external dependencies and almost nothing useless. It is used from development to production on version 7.0 and 8.0 with various community addons.

!!!Latest changes!!!

This image has been "applified" and behaves just like a binary application with several options.

Try running docker run --rm xcgd/odoo and see what happens :)

Check the BitBucket project page for contributing, discussing and reporting issues.
This README is updated with regards to your questions. Thank you for your help!

Recent changes:

  • when binding the volume /opt/odoo/etc, the default odoo.conf file is provided if none is found in the host folder
  • fixed some permission issues when binding volumes

Odoo version

This docker builds with a tested version of Odoo (formerly OpenERP) AND related dependencies. We do not intend to follow the git. The packed versions of Odoo have always been tested against our CI chain and are considered as production grade (apart from version 9 which is still is alpha stage). We update the revision pretty often, though :)

This is important to do in this way (as opposed to a nightly build) because we want to ensure reliability and keep control of external dependencies.

You may use your own sources simply by binding your local Odoo folder to /opt/odoo/sources/odoo/

Here are the current revisions from for each docker tag

# production grade
xcgd/odoo:7.0    a0484cbe45abb5dc393d3229ee1c6d24a4dfae23 (branch 7.0)
xcgd/odoo:8.0    d18d606a55330a6b9fd19596d8b12c4e9e0a4b57 (branch 8.0)

# playing only
xcgd/odoo:latest    7d3cda215a85dd81571a5dde3753fd2f954f6ccf (branch master/9alpha)

The tar is built with:

tar czvf ../odoo${version}.tgz *



you'll need xcgd/postgresql docker image or any other PostgreSQL image of your choice that you link with Odoo under the name db:

$ docker run --name="pg93" xcgd/postgresql

Note: read the instructions on how to use this image with data persistance. You also may use a distant server and change the configuration file accordingly.

Start Odoo

Run Odoo in the background, assuming you named your PostgreSQL container pg93 and target Odoo version 7.0:

$ docker run -p 8069:8069 --rm --name="xcgd.odoo" --link pg93:db xcgd/odoo:7.0 start

WARNING: note that we aliased the PostgreSQL as db. This is ARBITRARY since we use this alias in the configuration files.

If docker starts without issues, just open your favorite browser and point it to http://localhost:8069

The default admin password is somesuperstrongadminpasswdYOUNEEDTOCHANGEBEFORERUNNING

If you want to change the Odoo configuration with your own file you can bind it easily like so:

# let's pretend your configuration is located under /opt/odoo/instance1/etc/ on your host machine, you can run it by

$ docker run --name="xcgd.odoo" -v /opt/odoo/instance1/etc:/opt/odoo/etc -p 8069:8069 --link pg93:db -d xcgd/odoo start

If you want to use a specific configuration file, you can use the environment variable ODOO_CONF:

$ docker run -e ODOO_CONF=/etc/openerp.conf --name="xcgd.odoo" -v /opt/odoo/instance1/etc:/opt/odoo/etc -p 8069:8069 --link pg93:db -d xcgd/odoo start

By default the image does not chown the file in /opt/odoo anymore, if you need to run it, set the environment variable ODOO_CHOWN to true.

Security Notes

You'll note that we did not open ports to the outside world on the PostgreSQL container. This is for security reasons, NEVER RUN your PostgreSQL container with ports open to the outside world... Just --link the Odoo container (single host) or use an ambassador pattern (cluster).

This is really important to understand. PostgreSQL is configured to trust everyone so better keep it firewalled. And before yelling madness please consider this: If someone gains access to your host and is able to launch a container and open a port for himself he's got your data anyways... he's on your machine. So keep that port closed and secure your host. Your database is as safe as your host is, no more.

To prevent any data corruption during an image build, we use SHA256 algorithm to check file integrity of odoo archive and python requirement packages hosted on our repository.

Docker Pull Command
Source Repository

Comments (21)
2 years ago

There is no log file in the default odoo.conf. To view the log, use docker logs <container_name>, or provide a custom odoo.conf where you provide the file name of your choice.

2 years ago

Rebuilt automatically following the manual build of ubuntu4base, done to include the glibc fixes.

2 years ago

hello i need help regarding the location of the odoo log file it's impossible to put this image in production without knowing where is the log file . Thank you

2 years ago

I don't know what I do wrong, but I'm sure I do something wrong. I'm kinda new to docker, but I had no problem making the two containers needed for this. But after the last one says "openerp.service.server: HTTP service (werkzeug) running on" I get no respons in my webbrowser. It just runs on a timeout after a long while. Is there a way to view some log file to debug? Or something like that? I've tried to -v the log folder of odoo to a local folder. But not a single file ended up in there. Also I'm not sure if my local conf file is being used, is there a way to check that? Thank you in advance!

3 years ago

After playing around with the container build today, I take back what I said about the size, etc. You've obviously put quite a bit of work into it with finding the latest tools, etc., and your base ubuntu image really isn't large at all.

On another note, I've made my own mods to the boot script to look for 3 environment variables DB_USER, DB_PASS, and ADMIN_PASS. If they are passed in, then the default odoo.conf file will be edited to use these values. So no need for me to mount a separate volume. Downside is the passwords are in the clear in my startup script.

And anyway I was having strange docker problems mounting the volume. For some reason, odoo couldn't find much else in /opt/odoo/* when I was using "-v /my/odoo/etc:/opt/odoo/etc" to map the config directory. The web pages wouldn't load at all. But when I would docker exec into the container, I could see it all just fine. Might have to investigate that more when I have time.

3 years ago


Thanks for comment and support!

In a "quick start" situation, we assumed one would go with our provided xcgd/postgresql container and the default odoo.conf.

As the odoo.conf file is provided, commented and copied even when binding the /etc directory, we assumed an advanced user would set it up ad hoc pretty easily. Nonetheless, I may add further detail in the Start Odoo section of the README.

As stated at the beginning of the README, this image is just over 1Gb and the OS overhead is only around 130Mb. The Ubuntu-debootstrap is light enough from our point of view. The image contains all necessary dependencies which is pretty heavy but, hey, what did you expect when running a full stack ERP / ORM / CMS / WebClient / CoffeeMaker :)
By the way, version 9 will require further node.js components, adding a few more bytes, I am afraid :)

3 years ago

You should mention somewhere that the default config file assumes it will connect to a database whose superuser is "pg" with no password.

If someone wants to use their own postgresql container then they have to provide their own odoo config file with custom user/pass/dbname info (or start this odoo container interactively and edit the default config).

Also, the image size is over a gig. Why not use a smaller base container than ubuntu?

Otherwise, thanks for the container. Helps me streamline my server setup.

3 years ago


Thanks for your interest. You may find answers to most of your question in the project bug tracker.

We update this image on a regular basis with tested sources (not an nightly build). Just docker pull to get the last version.

You may bind your local sources or addons with the -v option.

To update a database, ie running odoo in with --update option, you have to run a container in interactive mode (safer than *docker exec) as explained in [issue #4][] of our tracker

Hope this helps and stay tuned for our next release :)

3 years ago

After the initial install, how to update Odoo files (addons, base ...) in Odoo container, with a new Odoo build ?

3 years ago


Thanks for your interest. You may use our bug tracker for a better contribution.

To answer your question, when you mount your local folder to /opt/odoo/etc like that, you have to provide your own odoo.conf and you are good to go!

To avoid this in the future, the next release of this image will check for a odoo.conf file in the mounted /etc folder and provide the default one if none is detected. You may find this easier so stay tuned :)