Skip to Content

Setting Up Odoo Development Environment with Docker on macOS

April 24, 2025 by
Setting Up Odoo Development Environment with Docker on macOS
Tasin Tarek

Step 0: Install Docker Desktop on macOS


    1. Download Docker Desktop for Mac from the official Docker website: https://docs.docker.com/desktop/setup/install/mac-install/
    2. Based on your Mac's processor:
      1. For Apple silicon (M1, M2, etc.): Download "Mac with Apple silicon" installer
      2. For Intel chip: Download "Mac with Intel chip" installer
    3. Double-click the downloaded .dmg file to open the installer
    4. Drag the Docker icon to your Applications folder
    5. Open Docker Desktop from your Applications folder
    6. Follow the on-screen prompts to complete installation and grant necessary permissions
    7. Verify Docker is running by checking the Docker icon in your menu bar or by running this command in Terminal
    8. bash

      docker --version

Step 1: Create a Project Directory

bash

mkdir odoo-dev
cd odoo-dev

Step 2: Create a docker-compose.yml File

Create a docker-compose.yml file in your project directory:

bash

touch docker-compose.yml

Open the file in your preferred editor and add the following configuration:

yaml

version: '3'
services:
  db:
    image: postgres:13
    environment:
      - POSTGRES_DB=postgres
      - POSTGRES_PASSWORD=odoo
      - POSTGRES_USER=odoo
    volumes:
      - odoo-db-data:/var/lib/postgresql/data
    networks:
      - odoo-network

  odoo:
    image: odoo:16.0
    depends_on:
      - db
    ports:
      - "8069:8069"
    environment:
      - HOST=db
      - USER=odoo
      - PASSWORD=odoo
    volumes:
      - ./addons:/mnt/extra-addons
      - ./config:/etc/odoo
      - odoo-web-data:/var/lib/odoo
    networks:
      - odoo-network

networks:
  odoo-network:

volumes:
  odoo-db-data:
  odoo-web-data:

Step 3: Create Configuration Directory and File

Create a configuration directory and an Odoo configuration file:

bash

mkdir -p config 
touch config/odoo.conf

Add the following content to config/odoo.conf:

[options]
addons_path = /mnt/extra-addons
data_dir = /var/lib/odoo
admin_passwd = admin
db_host = db
db_port = 5432
db_user = odoo
db_password = odoo

Step 4: Create Custom Addons Directory

Create a directory for your custom modules:

bash

mkdir -p addons

Step 5: Start the Docker Containers

Launch your Odoo environment:

bash

docker-compose up -d

Step 6: Access Odoo

Open your browser and navigate to:

http://localhost:8069