-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set PERL5LIB to /usr/lib in perl/stretch-slim (maybe others) #56
Comments
Hi @JJ, thanks for the report! This is basically the same as #26 (for the case of installing CPAN modules via Debian packages) but I'm curious as to what particular modules you're having difficulty installing here; I take that you're using Note that by default, docker-perl installs CPAN modules to |
Some lwp::simple deps such as html::entities and HTML::tagset. It's in my
jmerelo/iv-test image
El mié., 19 sept. 2018 18:48, Zak B. Elep <notifications@github.com>
escribió:
… Hi @JJ <https://github.com/JJ>, thanks for the report!
This is basically the same as #26
<#26> (for the case of
installing CPAN modules via Debian packages) but I'm curious as to what
particular modules you're having difficulty installing here; I take that
you're using cpanm as well to install those latest modules?
Note that by default, docker-perl installs CPAN modules to -Dsiteprefix,
which is usually in /usr/local/lib/perl5/site_perl/5.XX.X.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAB9Ax0FFefKoiWWU9OS0viXFB8Jut1ks5ucnVQgaJpZM4Wwipg>
.
|
I suppose it is this image Dockerfile? If so, I think you'll need a few things here:
Putting that all together, your Dockerfile might become like this: FROM perl:5.28-slim
WORKDIR /test
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc make libc6-dev \
&& cpanm Test::More Test::Harness Git File::Slurper \
JSON Net::Ping TAP::Formatter::Color Term::ANSIColor \
LWP::Simple
VOLUME /test
ENTRYPOINT ['/usr/local/bin/prove', '-c'] I'm able to install those modules listed above into the resulting image; if there are other dependencies, let me know so I can test as well. |
El mié., 19 sept. 2018 19:30, Zak B. Elep <notifications@github.com>
escribió:
Some lwp::simple deps such as html::entities and HTML::tagset. It's in my
jmerelo/iv-test image
I suppose it is this image Dockerfile
<https://github.com/JJ/iv-test/blob/master/Dockerfile>? If so, I think
you'll need a few things here:
Right
- since you're using perl:slim, you'll need to install the build
toolchain gang such as gcc, make, and libc6-dev
- once the above are installed, you can now cpanm LWP::Simple <other
CPAN deps>
- I recommend listing your module dependencies in a cpanfile
<https://metacpan.org/pod/cpanfile> so that your module installation
can simply become cpanm --installdeps ., instead of having to list
these directly in the Dockerfile
Putting that all together, your Dockerfile might become like this:
FROM perl:5.28-slim
WORKDIR /test
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc make libc6-dev \
&& cpanm Test::More Test::Harness Git File::Slurper \
JSON Net::Ping TAP::Formatter::Color Term::ANSIColor \
LWP::Simple
VOLUME /test
ENTRYPOINT ['/usr/local/bin/prove', '-c']
I'm able to install those modules listed above into the resulting image;
if there are other dependencies, let me know so I can test as well.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#56 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAAB9Jk28TLrzN6YEACU9MJLBx-6q0Xeks5ucn9OgaJpZM4Wwipg>
.
That's great. Thanks!
… |
It seems this is now resolved? I'll close this for now; feel free to re-open if needed. |
I have been figtingh with this image for long time, to eventually discover that, first, some modules available in the
latest
couldn't be installed here, and second, that when I installed them using default debian packages, they were not available to Perl. That's probably a feature of the perl version you are installing, and I know you can define env variables when running a Docker image, but since /usr/lib is the default place for installing system-wide modules, would it be possible to have it somehow built-in so that it's used from all Perl scripts?The text was updated successfully, but these errors were encountered: