Odoo, previously OpenERP, is a collection of open-source business applications built in Python and distributed under the LGPL license. This set of apps smoothly integrates all business needs, from website/ecommerce to production, inventory, and accounting. It’s the first time a software editor has achieved such a high level of functional coverage. Odoo is the most widely used business software worldwide. Odoo is utilized by 2 million people globally, ranging from tiny businesses, one user (1) to major corporations of three hundred thousand users (300,000).
In our today’s guide, we demonstrate how to run Odoo 15 in Docker Containers.
Features of Odoo 15
The following are the cool features of Odoo 15:
- Studio has the ability to edit graph views.
- Import screen has been updated.
- Project burn-down graphic landing in Odoo 15.
- HTML Editor has been updated.
- The product page for e-commerce has been redesigned.
- In Odoo15, a new approach for managing assets through the user interface has been introduced.
- It has coupons and promotions for use at the point of sale.
- It includes ES6 as well as a new debug asset mode.
- You can now produce the necessary CSV to e-file all of your 1099 reports at once.
- Create NACHA files to automate the scheduling and payment of vendor bills via ACH.
- For the Odoo Website Builder, we’re introducing shapes on photos.
Benefits of Running Odoo in Docker containers
The benefits you get from running Odoo in Docker containers include the following:
- Security is improved.
- Reliability that is second to none.
- Improved management.
- Uptime has increased.
How To Run Odoo 15 in Docker Containers
The following steps will guide us on how to run Odoo 15 in Docker Containers.
Step 1: Install Docker CE on your System
Use the guides below to install Docker CE in your machine.
Access the articles on shared link above to install Docker CE. For this demo, we are using Ubuntu 20.04. Let’s install Docker CE in this System. Run the following command to install Docker CE:
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ceStart and enable docker service:
sudo systemctl enable --now dockerAdd your user to the docker group in order to execute docker commands without sudo:
sudo usermod -aG docker $USER
newgrp dockerStep 2: Install Odoo 15 Docker Image
Now we only need to run one command once Docker is installed on your machine to install Odoo 15 Container.
$ docker pull odoo:15
15: Pulling from library/odoo
e5ae68f74026: Pull complete
af8928362baa: Pull complete
e1196c36b775: Pull complete
014833e3ecaf: Pull complete
a47ba6bcf217: Pull complete
8b2cb6d340eb: Pull complete
929ffb6475af: Pull complete
1dce199b6b09: Pull complete
8c1a3c709fb6: Pull complete
Digest: sha256:8062c21adb0a4e3200cf8e42408cf961201048f5ae088cf47b628a8274226db0
Status: Downloaded newer image for odoo:15
docker.io/library/odoo:15Step 3: Install PostgreSQL Database Docker Image
We must build up a database for Odoo to preserve its data on Docker after installing Odoo 15. PostgreSQL 13 will be set up by running the following command:
$ docker pull postgres:13
13: Pulling from library/postgres
e5ae68f74026: Already exists
7b8fcc7e1ad0: Pull complete
7527d03e2f77: Pull complete
80e55689f4d0: Pull complete
8a79eb6d69c9: Pull complete
397705f2d093: Pull complete
de36ec4eb0a5: Pull complete
08d878a022c1: Pull complete
25fa46cd24d5: Pull complete
6c2e03535137: Pull complete
9c4af5cab294: Pull complete
774b87929196: Pull complete
9799686c8835: Pull complete
Digest: sha256:3c6d1cef78fe0c84a79c76f0907aed29895dff661fecd45103f7afe2a055078e
Status: Downloaded newer image for postgres:13
docker.io/library/postgres:13Now, Create Database Container for Odoo 15 as shown below:
docker run -d -e POSTGRES_USER=odoouser -e POSTGRES_PASSWORD=odoopass -e POSTGRES_DB=postgres --name db postgres:13We can make a special folder to hold the database data. This means that even if the container is removed, our Odoo data will be preserved for future use.
docker run -d -v odoo-db:/var/lib/postgresql/data -e POSTGRES_USER=odoouser -e POSTGRES_PASSWORD=odoopass -e POSTGRES_DB=postgres --name db postgres:13Now check if the PostgreSQL database is running:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ecad6f65661f postgres:13 "docker-entrypoint.s…" 9 seconds ago Up 8 seconds 5432/tcp dbStep 4: Start and Run Odoo 15 Container
We’ll create and run a container for Odoo 15 using the supplied image.
docker run -p 8069:8069 --name odoo --link db:db -t odoo:15Preserving Odoo data using named Volumes
The Odoo filestore is generated inside the container when the Odoo container is formed as stated before. The filestore is lost if the container is removed. Using a Docker named volume is the best approach to avoid this.
docker run -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t odoo:15The volume named odoo-data created with the preceding command will persist even if the container is deleted and can be re-used with same command.
Check the status of Odoo 15:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8cf02c452bc9 odoo:15 "/entrypoint.sh odoo" 6 seconds ago Up 5 seconds 0.0.0.0:8069->8069/tcp, 8071-8072/tcp odoo
ecad6f65661f postgres:13 "docker-entrypoint.s…" 2 minutes ago Up 2 minutes 5432/tcp dbStep 5: Access Odoo 15 Web Interface
Open your browser and go to the server’s IP address as well as port 8069 as shown below.
Example: http://192.168.33.10:8069
For successful Access of Odoo 15 Web interface, You will get the following page. Create a database by entering the relevant information.
After successful login, you will get the following Odoo 15 Application.
You can install any Application you want to use by clicking install
This concludes this complete explanation on how to run Odoo 15 in Docker Containers. We’ve shown how simple it is to use Docker to run Odoo 15. I hope you found it simpler to perform Odoo 15 run in Docker Containers.
