I want to build a python interpreter in one container, then use the results of that build in other containers.
To build my python I need to install various build time dependencies. Most of these are devel packages. I do not want them in my run time.
Using from:python-builder in my docker file means I have to think about manually clearing out the dependencies after the build (of the python) has completed. I have two issues with this:
I don’t really trust that it can be done reliably
I don’t want the graph of my containers to be dictated by needing a python interpreter build.
I’d really like to treat the python-builder as a kind of “mixin”, and consume the data from its “output” volume using volumes-from. But volumes from can’t be used in the Dockerfile
If I really want devel packages I simply compile it outside docker and in Dockerfile COPY the binary file into image.
I don’t know whether this is practical for you.