Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
clientsdoc:odoo_docker_build [2022/03/30 07:30] – created aziz | clientsdoc:odoo_docker_build [2022/06/13 20:25] (current) – aziz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | hello | + | {{tag> docker build}} |
+ | |||
+ | ====== Ajouter des bibliothèques python à odoo sous docker ====== | ||
+ | {{ : | ||
+ | Certains modules Odoo ont des dépendances externes qui se présentent sous forme de bibliothèques python ou de paquets système. | ||
+ | |||
+ | Le module '' | ||
+ | |||
+ | |||
+ | Quand on est sous docker, il faut modifier l' | ||
+ | |||
+ | Ici nous allons utiliser l' | ||
+ | |||
+ | Pour modifier une image docker on utilisera un fichier de recette appelé Dockerfile. | ||
+ | |||
+ | <code ini Dockerfile> | ||
+ | FROM odoo:14.0 | ||
+ | USER root | ||
+ | RUN pip3 install -U pip | ||
+ | RUN pip3 install py-Asterisk | ||
+ | USER odoo | ||
+ | </ | ||
+ | |||
+ | Ce fichier sera nommé '' | ||
+ | |||
+ | |||
+ | Dans ce dossier exécutera la commande: | ||
+ | |||
+ | <code bash> | ||
+ | docker build . -t odoo: | ||
+ | </ | ||
+ | |||
+ | Cette commande va créer une nouvelle image odoo nommée '' | ||
+ | |||
+ | Cette nouvelle image sera ensuite utilisée pour lancer le container Odoo. | ||
+ | |||
+ | Pour cela, il faudra modifier le fichier '' | ||
+ | |||
+ | <code yaml [highlight_lines_extra=" | ||
+ | version: " | ||
+ | services: | ||
+ | odoo: | ||
+ | image: odoo: | ||
+ | container_name: | ||
+ | depends_on: | ||
+ | - db | ||
+ | ports: | ||
+ | - " | ||
+ | environment: | ||
+ | - DB_ENV_POSTGRES_USER=odoo | ||
+ | - DB_ENV_POSTGRES_PASSWORD=odoo | ||
+ | links: | ||
+ | - db:db | ||
+ | |||
+ | db: | ||
+ | image: postgres: | ||
+ | container_name: | ||
+ | environment: | ||
+ | - POSTGRES_USER=odoo | ||
+ | - POSTGRES_PASSWORD=odoo | ||
+ | </ | ||
+ | |||
+ | ===== Voir aussi ===== | ||
+ | * [[development: | ||
+ | ===== Références ===== | ||
+ | * https:// | ||
+ | * https:// |