odoo / docker

Other
932 stars 1.52k forks source link

Add support to install pip packages dependencies from external modules #365

Open aliencrash opened 3 years ago

aliencrash commented 3 years ago

One feature that would be interesting to add to the Dockerfile is the hability to dinamically specify files to be run pip install -r requirements before odoo start. That would allow to feed the requirements files from extra-addons and automatically install the necessary requirements.

jackadam1981 commented 2 years ago

Support the proposal

darm-torres commented 2 years ago

I would suggest you create your own dockerfile which use the Odoo Docker image as a base and pip install the requirements of your extra-addons.

You check this sample dockerfile for reference of creating your own dockerfile image

kennu commented 2 years ago

I also wish this was possible. It adds unnecessary complexity to Odoo deployments to create a custom Dockerfile and build and host a custom Docker image, just for the purpose of installing a few Python packages.

There could e.g. be a simple ODOO_PYTHON_REQUIREMENTS environment variable to specify the path of a requirements.txt file, and the Odoo Docker image would install it automatically at startup. You could then mount the requirements.txt file through a Docker volume mount.

ossimantylahti commented 2 years ago

Sounds like a good idea. +1

gertcuykens commented 1 year ago

I would suggest you create your own dockerfile which use the Odoo Docker image as a base and pip install the requirements of your extra-addons.

You check this sample dockerfile for reference of creating your own dockerfile image

Don't think this wil work in case you want to add parameters to the new image after -- and expect it to forward to base