How to install Odoo on Docker Container

#Introduction

In this tutorial, I will install Odoo version 13/14 on Docker Container. Odoo is a suite of well-known open-source business software that covers all your company needs: CRM, eCommerce, inventory, point of sale, project … Next, we will install Odoo on Docker Container

Install Odoo on Docker Container

  • OS Host: Centos 7
  • Docker image: odoo:14 and Postgres

Install Odoo Docker Image

To install Odoo use the command below:

#For odoo version 14
docker pull odoo:14

# For Oddo 13
docker pull odoo:13

Install PostgreSQL Database Docker Image

Use the command below:

docker pull postgres

The output terminal is as follows:

install Oddoo on Docker Container

Create Database Container

docker run -d -v odoo-db:/var/lib/postgresql/data -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres

Note:

  • odoo-db:/var/lib/postgresql/data – store the database data. This means after remove the container, odoo data will remain.
  • POSTGRES_USER=odoo– A User created for database
  • POSTGRES_PASSWORD=odoo – Password for the created database user
  • POSTGRES_DB=postgres– It is the Database name
  • –name db – Container name
  • postgres – The name docker image

Create and Run Odoo Container

docker run -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t odoo:14

The output terminal is as follows

install Oddoo on Docker Container

Allow port firewall

For Ubuntu, Debian, and others similar:

sudo ufw allow 8069

For RHEL, CentOS, AlmaLinux, RockyLinux, Oracle:

firewall-cmd --zone=public --add-port=8069/tcp --permanent
firewall-cmd --reload

Access Odoo Web interface

From your PC, Access Odoo and Create Database.

For example, http://192.168.3.4:8069

install Oddoo on Docker Container

The result, Installed Oddoo on Docker Container

install Oddoo on Docker Container

Conclusion

You have to install Oddoo on Docker Container. I hope will this your helpful. Thank you for reading the DevopsRoles page!

About HuuPV

My name is Huu. I love technology, especially Devops Skill such as Docker, vagrant, git, and so forth. I like open-sources, so I created DevopsRoles.com to share the knowledge I have acquired. My Job: IT system administrator. Hobbies: summoners war game, gossip.
View all posts by HuuPV →

2 thoughts on “How to install Odoo on Docker Container

  1. Good morning,
    I tested for an installation for Odoo 15, all worked well, but how do you install custom modules?

    1. Hi Sylvain
      You can try it
      1. Put your custom addon under the addons path.
      2. Goto settings -> Activate Developer Mode.
      3. Goto Apps -> Update Apps list

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.