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
Are there established ways of dealing with this ? (Other than the obvious wrapping with scripts and using --volumes-from on the command line)