Zum Inhalt springen
Odoo Menü
  • Anmelden
  • Jetzt gratis testen
  • Apps
    Finanzen
    • Buchhaltung
    • Rechnungsstellung
    • Spesenabrechnung
    • Tabellenkalkulation (BI)
    • Dokumente
    • E-Signatur
    Vertrieb
    • CRM
    • Vertrieb
    • Kassensystem – Shop
    • Kassensystem – Restaurant
    • Abonnements
    • Vermietung
    Websites
    • Website-Builder
    • E-Commerce
    • Blog
    • Forum
    • Livechat
    • E-Learning
    Lieferkette
    • Lager
    • Fertigung
    • PLM
    • Einkauf
    • Wartung
    • Qualität
    Personalwesen
    • Mitarbeiter
    • Personalbeschaffung
    • Abwesenheiten
    • Mitarbeiterbeurteilung
    • Personalempfehlungen
    • Fuhrpark
    Marketing
    • Social Marketing
    • E-Mail-Marketing
    • SMS-Marketing
    • Veranstaltungen
    • Marketing-Automatisierung
    • Umfragen
    Dienstleistungen
    • Projekte
    • Zeiterfassung
    • Außendienst
    • Kundendienst
    • Planung
    • Termine
    Produktivität
    • Dialog
    • Genehmigungen
    • IoT
    • VoIP
    • Wissensdatenbank
    • WhatsApp
    Apps von Drittanbietern Odoo Studio Odoo Cloud-Plattform
  • Branchen
    Einzelhandel
    • Buchladen
    • Kleidergeschäft
    • Möbelhaus
    • Lebensmittelgeschäft
    • Baumarkt
    • Spielwarengeschäft
    Essen & Gastgewerbe
    • Bar und Kneipe
    • Restaurant
    • Fast Food
    • Gästehaus
    • Getränkehändler
    • Hotel
    Immobilien
    • Immobilienagentur
    • Architekturbüro
    • Baugewerbe
    • Immobilienverwaltung
    • Gartenarbeit
    • Eigentümervereinigung
    Beratung
    • Buchhaltungsfirma
    • Odoo-Partner
    • Marketingagentur
    • Anwaltskanzlei
    • Talentakquise
    • Prüfung & Zertifizierung
    Fertigung
    • Textil
    • Metall
    • Möbel
    • Speisen
    • Brauerei
    • Firmengeschenke
    Gesundheit & Fitness
    • Sportklub
    • Brillengeschäft
    • Fitnessstudio
    • Therapeut
    • Apotheke
    • Friseursalon
    Handel
    • Handyman
    • IT-Hardware & -Support
    • Solarenergiesysteme
    • Schuster
    • Reinigungsdienstleistungen
    • HLK-Dienstleistungen
    Sonstiges
    • Gemeinnützige Organisation
    • Umweltschutzagentur
    • Plakatwandvermietung
    • Fotostudio
    • Fahrrad-Leasing
    • Software-Händler
    Alle Branchen ansehen
  • Community
    Lernen
    • Tutorials
    • Dokumentation
    • Zertifizierungen
    • Schulung
    • Blog
    • Podcast
    Bildung fördern
    • Bildungsprogramm
    • Scale-Up! Planspiel
    • Odoo besuchen
    Software anfragen
    • Herunterladen
    • Editionen vergleichen
    • Releases
    Zusammenarbeiten
    • Github
    • Forum
    • Veranstaltungen
    • Übersetzungen
    • Partner werden
    • Dienstleistungen für Partner
    • Buchhaltungsfirma registrieren
    Services anfragen
    • Partner finden
    • Buchhalter finden
    • Einen Experten treffen
    • Implementierungsservices
    • Kundenreferenzen
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Eine Demo erhalten
  • Preiskalkulation
  • Hilfe

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Buchhaltung
  • Lager
  • PoS
  • Projekte
  • MRP
All apps
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Sie müssen registriert sein, um mit der Community zu interagieren.
Alle Beiträge Personen Abzeichen
Stichwörter (Alle anzeigen)
odoo accounting v14 pos v15
Über dieses Forum
Hilfe

How to Build a Custom Odoo Docker Image from GitHub (Not Using Official Image)?

Abonnieren

Erhalten Sie eine Benachrichtigung, wenn es eine Aktivität zu diesem Beitrag gibt

Diese Frage wurde gekennzeichnet
odoogithubdocker
1 Antworten
5347 Ansichten
Avatar
Subin S R

I want to containerize Odoo on my server by building a custom Docker image directly from the GitHub repository instead of using the official Odoo Docker image. Has anyone done this before? I need guidance on:

  1. Best practices for creating a Dockerfile that clones and sets up Odoo from source.
  2. Handling dependencies (PostgreSQL, Python packages, etc.) properly.
  3. Managing custom addons and configurations in a self-built image.
  4. Any known issues or optimizations for production use.

If you’ve worked on similar projects or know good reference repos (like Doodba, odoocker, or others), please share your approach. Thanks!

0
Avatar
Verwerfen
Subin S R
Autor

Thank you so much for your guidance! I followed your instructions and was able to successfully deploy my custom Odoo Docker setup on my server. Really appreciate your help, it worked perfectly for me!

Avatar
Sergio Infante
Beste Antwort

Hi Subin

Yeah, I’ve done this a few times — building a custom Docker image for Odoo from source is totally doable and actually gives you more control, especially if you’re integrating custom modules or want to avoid the limitations of the official image.

Here’s a breakdown of best practices from real-world use:

Base Image and Dockerfile Setup:

Start with a slim base (like python:3.10-slim) to keep the image clean and efficient. Clone directly from the Odoo GitHub repo:

FROM python:3.10-slim


ENV LANG C.UTF-8


# System deps

RUN apt-get update && apt-get install -y \

    git build-essential libpq-dev libxml2-dev libxslt1-dev \

    libldap2-dev libsasl2-dev libjpeg-dev zlib1g-dev \

    libjpeg-dev libpng-dev liblcms2-dev libblas-dev libatlas-base-dev \

    libffi-dev libssl-dev libevent-dev \

    && apt-get clean


# Create odoo user

RUN useradd -ms /bin/bash odoo


# Clone Odoo

RUN git clone --depth 1 --branch 18.0 https://github.com/odoo/odoo.git /opt/odoo


WORKDIR /opt/odoo


# Install Python dependencies

COPY requirements.txt /opt/odoo/

RUN pip install -r requirements.txt


# Set permissions

RUN chown -R odoo:odoo /opt/odoo

USER odoo


CMD ["python3", "odoo-bin", "-c", "/etc/odoo/odoo.conf"]

Handle Dependencies

  • Use requirements.txt from the Odoo repo or generate it from setup/.
  • Keep PostgreSQL outside the container — either use Docker Compose or an external DB server. Make sure it’s tuned for Odoo (see previous PostgreSQL answer).
  • For wkhtmltopdf, use the static build (especially in production). Install it manually into the image.

Custom Addons & Config

Best practice is to mount custom addons via a volume or include them in the build:

COPY ./custom-addons /mnt/custom-addons

And make sure addons_path in odoo.conf includes:

addons_path = /opt/odoo/addons,/mnt/custom-addons

You can also use ARGs or ENV vars to toggle between dev/prod config files.

Known Gotchas & Optimizations

  • Don’t install too much into your image. Use multistage builds if needed.
  • Always pin the Git branch/tag to avoid weird surprises after future pushes.
  • Use healthchecks in Docker Compose to restart on failures.
  • Consider using PIP caching or building wheels for faster builds in CI/CD.
  • For production, run behind a reverse proxy (like Nginx) and isolate PostgreSQL.

Great Repos to Explore

  • Doodba (by Tecnativa) – very advanced, for serious DevOps. Uses Docker + git submodules + Makefiles + pre-commit hooks.
  • Odoocker (by yelizariev) – simple and clean, especially good for learning the build process.
  • OCA’s docker-odoo-project – community-driven, focused on modular development.

0
Avatar
Verwerfen
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!

Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!

Registrieren
Verknüpfte Beiträge Antworten Ansichten Aktivität
How to clear cache after change data_dir path
odoo docker
Avatar
Avatar
1
Juni 25
11981
Unable to update app list in dockerized odoo
odoo docker
Avatar
Avatar
1
Nov. 22
4891
How to install addon modules using Odoo doodba
odoo docker
Avatar
Avatar
1
Nov. 20
7034
ERROR: couldn't create the logfile directory. Logging to the standard output.
odoo docker
Avatar
Avatar
6
Juni 20
23847
Odoo Docker Setup - How To?
ubuntu odoo docker
Avatar
Avatar
2
Dez. 24
15543
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Herunterladen
  • Github
  • Runbot
  • Übersetzungen
Dienstleistungen
  • Odoo.sh-Hosting
  • Support
  • Upgrade
  • Individuelle Entwicklungen
  • Bildung
  • Buchhalter finden
  • Partner finden
  • Partner werden
Über uns
  • Unsere Firma
  • Markenwerte
  • Kontakt
  • Karriere
  • Veranstaltungen
  • Podcast
  • Blog
  • Kunden
  • Rechtliches • Datenschutz
  • Sicherheit
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo ist eine Suite von Open-Source-Betriebsanwendungen, die alle Bedürfnisse Ihres Unternehmens abdecken: CRM, E-Commerce, Buchhaltung, Lager, Kassensystem, Projektmanagement etc.

Das einzigartige Wertversprechen von Odoo ist, dass es gleichzeitig sehr einfach zu bedienen und voll integriert ist.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now