How to install Odoo 13 or 14 on Docker Container – H2S Media

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.
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-
(function(){for(var g="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,a){if(a.get||a.set)throw new TypeError("ES3 does not support getters and setters.");b!=Array.prototype&&b!=Object.prototype&&(b[c]=a.value)},h="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,k=["String","prototype","repeat"],l=0;lb||1342177279>>=1)c+=c;return a};q!=p&&null!=q&&g(h,n,{configurable:!0,writable:!0,value:q});var t=this;function u(b,c){var a=b.split(“.”),d=t;a[0]in d||!d.execScript||d.execScript(“var “+a[0]);for(var e;a.length&&(e=a.shift());)a.length||void 0===c?d[e]?d=d[e]:d=d[e]={}:d[e]=c};function v(b){var c=b.length;if(0<c){for(var a=Array(c),d=0;d=c.offsetWidth&&0>=c.offsetHeight)a=!1;else{d=c.getBoundingClientRect();var f=document.body;“pageYOffset”in window?window.pageYOffset:(document.documentElement||f.parentNode||f).scrollTop);d=d.left+(“pageXOffset”in window?window.pageXOffset:(document.documentElement||f.parentNode||f).scrollLeft);f=a.toString()+”,”+d;b.b.hasOwnProperty(f)?a=!1:(b.b[f]=!0,a=a<=b.g.height&&d<=b.g.width)}a&&(b.a.push(e),b.c[e]=!0)}y.prototype.checkImageForCriticality=function(b){b.getBoundingClientRect&&z(this,b)};u("pagespeed.CriticalImages.checkImageForCriticality",function(b){x.checkImageForCriticality(b)});u("pagespeed.CriticalImages.checkCriticalImages",function(){A(x)});function A(b){b.b={};for(var c=["IMG","INPUT"],a=[],d=0;d<c.length;++d)a=a.concat(v(document.getElementsByTagName(c[d])));if(a.length&&a[0].getBoundingClientRect){for(d=0;c=a[d];++d)z(b,c);a="oh="+b.l;b.f&&(a+="&n="+b.f);if(c=!!b.a.length)for(a+="&ci="+encodeURIComponent(b.a[0]),d=1;d=a.length+e.length&&(a+=e)}b.i&&(e=”&rd=”+encodeURIComponent(JSON.stringify(B())),131072>=a.length+e.length&&(a+=e),c=!0);C=a;if(c){d=b.h;b=b.j;var f;if(window.XMLHttpRequest)f=new XMLHttpRequest;else if(window.ActiveXObject)try{f=new ActiveXObject(“Msxml2.XMLHTTP”)}catch(r){try{f=new ActiveXObject(“Microsoft.XMLHTTP”)}catch(D){}}f&&(“POST”,d+(-1==d.indexOf(“?”)?”?”:”&”)+”url=”+encodeURIComponent(b)),f.setRequestHeader(“Content-Type”,”application/x-www-form-urlencoded”),f.send(a))}}}function B(){var b={},c;c=document.getElementsByTagName(“IMG”);if(!c.length)return{};var a=c[0];if(!(“naturalWidth”in a&&”naturalHeight”in a))return{};for(var d=0;a=c[d];++d){var e=a.getAttribute(“data-pagespeed-url-hash”);e&&(!(e in b)&&0<a.width&&0<a.height&&0<a.naturalWidth&&0
=b[e].o&&a.height>=b[e].m)&&(b[e]={rw:a.width,rh:a.height,ow:a.naturalWidth,oh:a.naturalHeight})}return b}var C=””;u(“pagespeed.CriticalImages.getBeaconData”,function(){return C});u(“pagespeed.CriticalImages.Run”,function(b,c,a,d,e,f){var r=new y(b,c,a,e,f);x=r;d&&w(function(){window.setTimeout(function(){A(r)},0)})});})();pagespeed.CriticalImages.Run(‘/mod_pagespeed_beacon’,’’,’Eu877fTLHi’,true,false,’JC0VBg7Y_7E’);
//]]>Docker PostgreSQL and Odoo Images command

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.
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
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.
Enter the required information and create a database
Create Odoo Database
Install Apps and start using on Odoo.
Odoo Apps install on Docker container CRM adn ERP
Heyan Maurya Linux
Heyan Maurya Linux
Heyan Maurya Linux

Heyan Maurya Ubuntu

document.getElementById(“ak_js”).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.


Leave a Reply

Your email address will not be published. Required fields are marked *