docker icon indicating copy to clipboard operation
docker copied to clipboard

Add support to install pip packages dependencies from external modules

Open aliencrash opened this issue 3 years ago • 5 comments

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.

aliencrash avatar Apr 09 '21 20:04 aliencrash

Support the proposal

jackadam1981 avatar Aug 12 '21 09:08 jackadam1981

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

darm-torres avatar Aug 13 '21 00:08 darm-torres

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.

kennu avatar May 22 '22 11:05 kennu

Sounds like a good idea. +1

ossimantylahti avatar May 22 '22 13:05 ossimantylahti

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

gertcuykens avatar Jan 12 '23 02:01 gertcuykens