top of page

How to Set up Odoo CE 18 Docker Desktop (Windows OS)

  • Writer: Tek Siong, Hock
    Tek Siong, Hock
  • May 9
  • 2 min read

If you are planning to use docker desktop for Odoo local development, and need to be convinced of the benefits.


Benefits of Docket Desktop for Odoo Development

  1. Quick and simple set up, if you following the guide below. This will be especially handy when you have multiple version of Odoo, python libraries, etc, in your Windows development environment


  1. Developer can develop and test your Odoo codes in the environment that mirror the server Ubuntu environment. Eg, schedule action.


  1. Deploy the docker image to the remote server easily with the same environment.


Docker Desktop Features

  1. Quick Setup – No manual dependency installation; containers handle everything.

  2. Isolated Environment – Avoids conflicts with other software on your system.

  3. Easy Updates – Change Odoo or PostgreSQL versions with a single command.

  4. Portability – Move or deploy the same setup anywhere Docker runs.

  5. Clean Removal – Delete containers without leaving traces on your host machine.


Quicks Start Guide

  1. Pre Requisite 

Get supporting files from folder


  1. Install WSL command


In powershell

wsl --install

Search on Windows store install Ubuntu 24.04.5 LTS



Verify installation

wsl --status



  1. Install Docker Desktop

Download from the following URL Windows | Docker Docs


Run installer


  1. Run Docker

Docker-compose build download odoo specified in “dockerfile” file. Currently, it will download odoo 18 released in august 2024. To download odoo 18 released in december 2024, change “dockerfile” to other name (e.g. “dockerfile_old) and rename “dockerfile_dec” to “dockerfile”

Sample docker-compose.yml


```yaml

version: '3.7'


services:

odoo:

image: odoo:18

container_name: odoo

build: .

ports:

- "8080:8080" # Odoo web interface will be available on port 8069

environment:

- HOST=db

- USER=odoo

- PASSWORD=odoo

- DB_NAME=odoo # Specify the database name


volumes:

- ./custom/addons:/mnt/extra-addons # Mount your custom addons

- odoo-data:/var/lib/odoo # Persistent Odoo data

depends_on:

db:

condition: service_healthy # Wait for the database to be healthy

networks:

- odoo-net

command: >

odoo --xmlrpc-port=8080 --init=base --load=base --database=odoo

healthcheck:

test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]

interval: 30s

timeout: 10s

retries: 5

db:

image: postgres:15

container_name: odoo-db

environment:

- POSTGRES_DB=odoo

- POSTGRES_USER=odoo

- POSTGRES_PASSWORD=odoo

volumes:

- odoo-db-data:/var/lib/postgresql/data

networks:

- odoo-net

healthcheck:

test: ["CMD-SHELL", "pg_isready -U odoo"]

interval: 30s

timeout: 10s

retries: 5

volumes:

odoo-data:

odoo-db-data:


networks:

odoo-net:

driver: bridge

```

In the respctive project folder extracted from Step 1

Build the docker image

docker-compose  build

Run and build the container in the background

docker-compose up -d



On the docker desktop application, Containers




  1. Login to Odoo




Login: admin

password: admin



Done, Odoo CE can be used locally




  1. Adding Modules and Python Package (optional)

    To stop service and remove containers

Run docker-compose down

In the project folder, navigate to custom> addons

Drop any third party module, check if there any python package requirements

Example , packaging and paramiko (python package)


Add the package name in the requirements.txt



Run

docker-compose build

And

docker-compose up -d  

to build and update the container with the newly added module and package







Recent Posts

See All
Odoo Performance Profile for debugging

Odoo Performance Profile for debugging, If you are on Odoo 16 and below, and need a good tool for debugging the performance of your Odoo system, this will be the right content for you.

 
 
 

Comentários


Subscribe Form

  • facebook
  • linkedin

©2019 by Excelroot Technology Sdn Bhd.

bottom of page