By: Mashood K

How to Install Odoo 13 Using Docker

Technical Odoo 13

Docker is an application-level deployment tool that helps the developers and users to create, deploy, run and maintain their applications by using containers. These containers help the developers to integrate various parts of their software developing packages/tools/environments/libraries etc into a single instance. By doing this, developers can run their applications in any other environment without worrying about their dependency variations. Docker actually behaves like a virtual machine. By using Docker functionalities with Odoo, the user doesn’t need to worry about the dependencies, packages and so forth. Just consider the Odoo image. Odoo has all the required packages and libraries within this image. Thus, Docker makes things easy for both developers and end-users.

To run Odoo on docker, we have to set-up two docker containers. For that, we can use docker images
1. Odoo Image: Odoo has an official image (Odoo Image) on the Docker in order to install Odoo on the docker virtual environment. 
2. Postgress Image: Odoo uses Postgres SQL to store and manipulate its data. So before configuring Odoo image, we have to make sure that a Postgres image is properly running on our docker environment.

Install docker(Ubuntu 18.04)
First of all, we have to make sure that every required package is properly installed in the system in order to run the docker.

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Get a GPG key for better maintenance and security.

curl -fsSL | sudo apt-key add -

Get a stable version of the Docker repository.

sudo add-apt-repository "deb [arch=amd64] (lsb_release -cs) stable"

Update the system packages.

sudo apt update

Install Docker(Here, we are installing the community edition)

sudo apt install docker-ce

Add a user to the docker group.

sudo usermod -aG docker $USER

Once every mentioned step is complete, you can check whether the Docker is installed properly or not by using a simple hello world command.

docker run hello-world

Install Odoo on docker
We have successfully installed  Docker on the system. Now we have to install the Odoo image on the docker. A running PostgreSQL should be there in order to run the Odoo image on the docker. So, before going to Odoo image, we have to make sure that a Postgres image runs properly on the docker environment.

Install Postgres image

docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10

Install Odoo image

docker run -p 8069:8069 --name odoo --link db:db -t odoo

Odoo tries to find the name ‘db’ of the Postgres container. So in order to connect the Odoo with PostgreSQL, the alias of the Postgres container should be ‘db’.
You can use your custom conf file in the Odoo container.

docker run -v /custom/conf/path:/etc/odoo -p 8069:8069 --name odoo --link db:db -t odoo

While starting, Odoo will find the custom conf file from the /custom/conf/path.

docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t odoo

If you want to include custom addons, use the /mnt/extra-addons volume.

Set-up a docker-compose.yml
Create a docker-compose.yml file which contains all the basic information about the Odoo-container and the database container. Here is the simplest one.
version: '2'
    image: odoo:12.0
      - db
      - "8069:8069"
    image: postgres:10
      - POSTGRES_DB=postgres
      - POSTGRES_USER=odoo

You can change the configuration to make as your requirement:
* web/image: Version of the Odoo
* The default port will be 8069:8069, By changing the first port, you will be able to have multiple Odoo instances simultaneously.
* db/image: Version of the Postgres image.

Useful commands:

* Run docker. Take a look
* docker start container_name (Start docker with a container)
* docker restart container_name (Restart docker with a container)
* docker stop container_name (Stop docker with a container)
* docker-compose up -d  (To start an Odoo instance. The directory should be the same where the docker-compose.yml file exists)
* docker run -p 8070:8069 --name odoo1 --link db:db -t odoo

docker run -p 8071:8069 --name odoo2 --link db:db -t odoo
To start multiple Odoo instances at a time, make sure that the PostgreSQL container’s alias name is db. Otherwise, Odoo won’t consider the command. You can have any number of Odoo instances at a time by changing its port.

cybrosys youtube




Hi there, I'm working as a freelance Odoo consultant , and is now stuck with Docker. I want to install odoo 13 enterprise edition with docker-compose But I don't know where to find a docker image of odoo 13 enterprise edition. Can you help me? Thanks in advance




Keriwala Sakib

sudo usermod -aG docker $USER Here in this command when we will write any other name like odoo_13 or odoo instead of $USER then it will be fine or not ?




Keriwala Sakib

while writing the command sudo apt install docker-ce , it is giving me an error like this E: Unable to locate package docker-ce




Leave a comment


Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635


Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom


Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.


Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message