You can use the standard installer module to your base OS image on your Dockers.
For example, if it uses RedHat yum and uses CPAN only when they are available
FROM centos:centos7 RUN yum -y install cpanm gcc perl perl-App-cpanminus perl-Config-Tiny && yum clean all RUN cpanm install Some::Module; rm -fr root/.cpanm; exit 0
It is taken from here and change
I tried to get the base image that is used in real-world applications
I would also like to avoid doing things in an interactive mode (for example, script file docker), because you want to be able to repeat the assembly when the flow changes up change, which docker makes hub for you.
CHANGE you can convert perl modules into their own packages using dh-make-perl
You can download them into your own Ubuntu repo using reprepro or paid solution Artifactory
Then they can be installed using apt-get, when you use your repo as a source of docker file.
When I tried the same thing in front of There are several problems
- Your applications do not work with the latest version of the module.
- There are far more dependent than you expected
- Some modules are not packed
Benefits
- You keep the assembly tools (gcc, etc.) with application servers.
- You know much more about its dependencies.
source share