There is a couple of well-known open-source business management software and Odoo is one of them. It offers ERP, CRM, ECM, project planning, and more… In this article, we learn how to install Odoo 14 and 13 on a docker container running on Ubuntu 20.04 LTS Focal fossa.
Odoo is free business software that covers a wide range of tasks. In addition to classic ERP functions, the environment offers CRM, E-commerce, content management, project planning, warehouse management, accounting, personnel management, portal, knowledge base, product management, human resources, marketing, and more.
The basis of Odoo is the former OpenERP, which is based on a typical three-tier architecture. The core is the application server, which is responsible for the business logic and controls access to the database.
The system also provides modules for the areas of e-business, e-marketing, and e-commerce. There are over 10,000 Odoo Apps- and the number is increasing every day. It is programmed in Python and offers a modern web interface that uses HTML 5.0 and JavaScript. It uses a PostgreSQL database server to manage business-relevant data and the system configuration.
Whereas Docker is a container-based virtualization platform that can be installed on a popular operating system to create isolated containers (virtual machines), very light in weight.
Contents
Here we are using Ubuntu 20.04 LTS as an OS platform to install Docker, however, the steps given here to install Odoo can be used on any platform running with Docker.
Simply run a command – docker
on your operating system’s command terminal, to confirm you have it. If you don’t have it, then install Docker on your OS, first, for that you can check out our tutorials-
Well. once you have Docker on your system, to install Odoo Container, we just need to run a single command. It is because the Docker hub already has a pre-built official image of Odoo.
To install Odoo 14, use this command:
For Oddo 13, use this one:
The next thing we need to set up is the database for Odoo to save its data on Docker. Well, just like any other popular app, we already have a pre-built image for this database as well. Hence, just on your command terminal type-
Well, we already have downloaded the PostgreSQL image above, now we will use the same to create a container with a database.
Note: Don’t forget to change the database user and password including DB name with the one you want to assign before running the command.
Explanation:
Let’s break the above command to understand what is happening.docker run -d -v
: This is a docker command to create and start the container using the downloaded image.odoo-db:/var/lib/postgresql/data
– Using this we have created a dedicated separate folder that will store the database data. This means even after removing the container, our Odoo data will remain intact for future usage.POSTGRES_USER=odoo
– A User created for database, change the value with whatever you want.POSTGRES_PASSWORD=odo0
– Password for the created database user. Also, change this value as well to set your password.POSTGRES_DB=postgres
– It is the Database name you want to use.--name db
– Container name to identify it.postgres
– It is the name of the downloaded PostgreSQL image we are using to create the container.
Just like we did for PostgreSQL, we also use the downloaded Odoo 14 or 13 image to create and run a container for it.
For Odoo version 14
For Odoo Version 13
Explanation:odoo-data:/var/lib/odoo
: We have created a dedicated persistent data folder that will store Odoo data and configuration files and will remain there even after deleting the container.-p 8069:8069
: Opening Port 8069 of docker to access the Odoo web interface out of the docker. Or in simple words here we are mapping the docker container port to the system’s 8069 port.--name odoo
– It is the name we are giving to our container.--link db:db
– Linking PostgreSQL container with the Odoo one, so that they can communicate.
Whereas odoo:13
or odoo:14
are the Docker image we are using to create a container.
Now, to access the Odoo Web interface from outside the server where you have installed it using the docker, we have to open its port 8069 on the system.
For Ubuntu, Debian, Linux Mint, and others similar:
For RHEL, CentOS, AlmaLinux, RockyLinux, Oracle:
Now, go to any PC or Laptop that can access the Server ip-address where you have installed the Docker and its container. After that, open the browser and point it to the server-ip-address along with port number 8069.
Example:
Enter the required information and create a database
Install Apps and start using on Odoo.
Heyan Maurya Ubuntu
Heyan Maurya Linux
18482 Views
Heyan Maurya Ubuntu
37878 Views
Heyan Maurya Ubuntu
document.getElementById( “ak_js_1” ).setAttribute( “value”, ( new Date() ).getTime() );
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Linux Shout crafted as a part of our main portal H2S Media to publish Linux related tutorials and open source Software.