Docker is an application-level deployment tool that enables the developers and users to make, deploy, run and maintain their applications by using containers. These containers enable the developers to integrate various parts of their software developing packages/tools/environments/libraries into one instance. By doing this, developers can run their applications in the other environment without fear of their dependency variations. Docker behaves sort of a virtual machine. By using Docker functionalities with Odoo 13, the user doesn’t get to worry about the dependencies, packages then forth. Just consider the Odoo image. Odoo has all the specified packages and libraries within this image. Thus, Docker makes things easy for both developers and end-users. Let’s explore the key steps to install Odoo 13 via Docker.
To run Odoo on docker, we have to set-up two docker containers. For that, we can use docker images
1. Odoo Image in Docker: Docker container already has an official image of the Odoo to install Odoo on the docker virtual environment.
2. Postgres Image in Docker: The DB used by Odoo is Postgresql. Before the configurations of the Odoo Image in the container, we have to configure the Postgresql image so the Odoo runs properly on the docker environment.
We are an ERP development company that provides Odoo development services to fulfill dynamic business requirements. Our ERP team has completed multiple implementations for a wide range of industries including manufacturing, automotive, health, retail, and finance.
Key Steps to Install Odoo 13 Via Docker
Install docker(Ubuntu 18.04)
First of all, we have to install every required package in the system to run the docker:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Get the GPG key for maintenance and security:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Get a stable version of the Docker repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu (lsb_release -cs) stable"
Update all the system packages:
sudo apt update
Install Docker(Here, we are installing the community edition) using below command:
sudo apt install docker-ce
Add a user to the docker group:
sudo usermod -aG docker $USER
Check the docker installation by using the below command:
docker run hello-world
Install Odoo 13 on docker:
We have successfully installed Docker on the system. Now we've to put in the Odoo image on the docker. A running PostgreSQL should be there to run the Odoo image on the docker. So, before getting to Odoo's image, we've to form sure that a Postgres image runs properly on the docker environment.
Install Postgre SQL image:
docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
Install Odoo 13 image:
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 would like to incorporate custom addons, use the /mnt/extra-addons volume.
Set-up a docker-compose.yml
Create a docker-compose.yml file which contains all the essential information about the Odoo-container and therefore the database container. Here is that the simplest one.
For changing 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.
* Run docker.
* For starting docker with the container use this command docker start container_name
* For restarting docker with the container use this command docker restart container_name
* For stopping docker with the container use this command docker stop container_name
* To start an Odoo instance. The directory should be the same where the docker-compose.yml file exists docker-compose up -d
docker run -p 8070:8069 --name odoo1 --link db:db -t odoo
To start multiple Odoo instances at a time, confirm that the PostgreSQL container’s alias name is db. Otherwise, Odoo won’t consider the command. You will have any number of Odoo instances at a time by changing its port.
Odoo 13 provides a myriad of functionalities and features to increase business efficiency. Integrating Odoo 13 not only expands business but also automates the entire process at a centralized place. At Oodles, we have a stack of 10,000+ Odoo supported modules that can be efficiently integrated with the existing system.
Get in touch with our ERP team to avail the benefits of Odoo 13!