How to create a dependency container separate from an official image?

Hello, I’m struggling to install some python dependencies separate from an official docker image (Odoo:12.0). I’m trying to learn docker but I’m not sure what to do in this case. I’ve tried:

  1. Rebuilding the image adding the dependencies in the Dockerfile (Somehow a bunch of dependencies fail to install via this method…)
  2. Manually entering the docker container and downloading the dependencies there (Odoo doesn’t recognize the dependencies and tells me the dependency is missing.)

I’ve read that one could make a sort of separate volume with those extra dependencies but I haven’t achieved much. Any ideas on how to proceed?

Cheers

The easiest way is to build your own image that depends on odoo:12.0 and install the dependencies there. Something like:

FROM odoo:12.0

RUN set -x; \
  apt-get update \
  && apt-get install -y --no-install-recommends \
  # your dependencies here
  && rm -rf /var/lib/apt/lists/*

I assume that they are available as Debian packages.