GithubHelp home page GithubHelp logo

perl / docker-perl Goto Github PK

View Code? Open in Web Editor NEW
115.0 115.0 51.0 500 KB

Dockerfiles for index.docker.io (official Perl Docker image)

Home Page: https://registry.hub.docker.com/_/perl/

License: Artistic License 2.0

Perl 6.18% Dockerfile 93.82%

docker-perl's People

Contributors

anatofuz avatar hem42 avatar j0wi avatar petermartini avatar rjx avatar tekki avatar tianon avatar waterkip avatar zakame avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-perl's Issues

support arm64 architecture

I build the docker-perl/5.026.000-64bit/Dockerfile from arm64v8/buildpack-deps:stretch and make success,
so I think we can add it to support arm64.

Cannot build/test older (e.g. < 5.20 Perl images) on modern buildpack-deps

As the images use buildpack-deps:latest as their base, some versions of Perl can no longer properly build or test, due to the update churn of the build toolchain. I encountered this now in part of investigating #17 and whether it still occurs in newer Docker releases.

I think we can start checking on using tagged buildpack-deps per Perl version and adjust appropriately.

'apt-get update' fail

When trying to "apt-get update" in my Dockerfile it fails with

---> Running in f3c1657f3351
E: The method driver /usr/lib/apt/methods/https could not be found.

I've tried 5.20, 5.22 and 5.24 tags

Cannot add modules in container

I cannot install modules when building a container. I have tried the official images and various OS images. I always hit this error.

Modification of a read-only value attempted at /usr/share/perl5/core_perl/CPAN/Distribution.pm line 4020.

Install of XMLTV::Usage is impossible on armhf/perl

I need to install XMLTV to run a script on my Raspberry Pi with an ARM CPU.

~ # docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp armhf/perl:5.24.1 perl 
tv_grab_fr_telerama --config-file=/storage/.xmltv/tv_grab_fr_telerama.conf --output=/media/My\ Passport/IPTV/xmltv/complet.xml
Can't locate XMLTV/Usage.pm in @INC (you may need to install the XMLTV::Usage module) (@INC contains: /usr/local/lib/perl5/site_perl/5.24.1/arm-linux-gnueabihf-64int /usr/local/lib/perl5/site_perl/5.24.1 /usr/local/lib/perl5/5.24.1/arm-linux-gnueabihf-64int /usr/local/lib/perl5/5.24.1 .) at tv_grab_fr_telerama line 333.
BEGIN failed--compilation aborted at tv_grab_fr_telerama line 333.

But I have an error when i try to install it :

~ # docker run armhf/perl:latest cpan install XMLTV::Usage
Loading internal null logger. Install Log::Log4perl for logging messages

CPAN.pm requires configuration, but most of it can be done automatically.
If you answer 'no' below, you will enter an interactive dialog for each
configuration option instead.

Would you like to configure as much as possible automatically? [yes] yes
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
Reading '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/02packages.details.txt.gz
Reading '/root/.cpan/sources/modules/02packages.details.txt.gz'
  Database was generated on Sat, 09 Sep 2017 23:17:03 GMT
  HTTP::Date not available
.............
  New CPAN.pm version (v2.16) available.
  [Currently running version is v2.11]
  You might want to try
    install CPAN
    reload cpan
  to both upgrade CPAN.pm and run the new version without leaving
  the current session.


...............................................................DONE
Fetching with HTTP::Tiny:
http://www.cpan.org/modules/03modlist.data.gz
Reading '/root/.cpan/sources/modules/03modlist.data.gz'
DONE
Writing /root/.cpan/Metadata
Running install for module 'XMLTV::Usage'
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/E/ED/EDAVIS/xmltv-0.5.33.tar.gz
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/id/E/ED/EDAVIS/CHECKSUMS
Checksum for /root/.cpan/sources/authors/id/E/ED/EDAVIS/xmltv-0.5.33.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring E/ED/EDAVIS/xmltv-0.5.33.tar.gz with Makefile.PL

Choose which optional components of xmltv you want to install.  The
XMLTV.pm library and the filter programs such as tv_grep and tv_sort
are installed by default; here you choose grabbers for different
countries and front-ends for managing listings.

Alternative grabber for Britain (tv_grab_uk_rt)                    [no]
Grabber for Italy (tv_grab_it)                                     [yes]
Grabber for North America using DataDirect (tv_grab_na_dd)         [no]
Grabber for North American Channel Icons (tv_grab_na_icons)        [no]
Grabber for New Zealand (tv_grab_nz)                               [yes]
Grabber for Finland (tv_grab_fi)                                   [no]
Grabber for Spain - Analogic Terrestrial/Cable (tv_grab_es)        [no]
Grabber for Spain - Digital Satellite (D+) (tv_grab_es_digital)    [no]
Grabber for the Netherlands (tv_grab_nl)                           [no]
Alternative grabber for the Netherlands (tv_grab_nl_wolf)          [no]
Grabber for Hungary (tv_grab_hu)                                   [no]
Grabber for Denmark (tv_grab_dk)                                   [no]
Grabber for Japan (tv_grab_jp)                                     [no]
Grabber for Germany (tv_grab_de_tvtoday)                           [no]
Grabber for Sweden (tv_grab_se)                                    [no]
Grabber for France (tv_grab_fr)                                    [no]
Grabber for Norway (tv_grab_no)                                    [no]
Grabber for Portugal (tv_grab_pt)                                  [no]
Program to report exceptions and changes in a schedule (tv_check)  [no]
CGI program to filter listings (to install manually) (tv_pick_cgi) [no]

Do you want to proceed with this configuration? [yes,no (default=yes)] 
* Alternative grabber for Britain (tv_grab_uk_rt)

These dependencies are missing for tv_grab_uk_rt:

HTML::Entities (version 1.27 or higher)

Do you wish to install tv_grab_uk_rt? [yes,no (default=no)] 
* Grabber for Italy (tv_grab_it)

Do you wish to install tv_grab_it? [yes,no (default=yes)] 
* Grabber for North America using DataDirect (tv_grab_na_dd)

These dependencies are missing for tv_grab_na_dd:

SOAP::Lite

Do you wish to install tv_grab_na_dd? [yes,no (default=no)] 
* Grabber for North American Channel Icons (tv_grab_na_icons)

These dependencies are missing for tv_grab_na_icons:

HTML::TableExtract
WWW::Mechanize (version 1.02 or higher)

Do you wish to install tv_grab_na_icons? [yes,no (default=no)] 
* Grabber for New Zealand (tv_grab_nz)

Do you wish to install tv_grab_nz? [yes,no (default=yes)] 
* Grabber for Finland (tv_grab_fi)

These dependencies are missing for tv_grab_fi:

HTML::TreeBuilder

Do you wish to install tv_grab_fi? [yes,no (default=no)] 
* Grabber for Spain - Analogic Terrestrial/Cable (tv_grab_es)

These dependencies are missing for tv_grab_es:

HTML::TreeBuilder

Do you wish to install tv_grab_es? [yes,no (default=no)] 
* Grabber for Spain - Digital Satellite (D+) (tv_grab_es_digital)

These dependencies are missing for tv_grab_es_digital:

HTML::TreeBuilder

Do you wish to install tv_grab_es_digital? [yes,no (default=no)] 
* Grabber for the Netherlands (tv_grab_nl)

These dependencies are missing for tv_grab_nl:

HTML::TreeBuilder

Do you wish to install tv_grab_nl? [yes,no (default=no)] 
* Alternative grabber for the Netherlands (tv_grab_nl_wolf)

These dependencies are missing for tv_grab_nl_wolf:

HTML::TreeBuilder

Do you wish to install tv_grab_nl_wolf? [yes,no (default=no)] 
* Grabber for Hungary (tv_grab_hu)

These dependencies are missing for tv_grab_hu:

HTML::TreeBuilder

Do you wish to install tv_grab_hu? [yes,no (default=no)] 
* Grabber for Denmark (tv_grab_dk)

These dependencies are missing for tv_grab_dk:

HTML::TreeBuilder

Do you wish to install tv_grab_dk? [yes,no (default=no)] 
* Grabber for Japan (tv_grab_jp)

These dependencies are missing for tv_grab_jp:

HTML::TreeBuilder
Text::Kakasi

Do you wish to install tv_grab_jp? [yes,no (default=no)] 
* Grabber for Germany (tv_grab_de_tvtoday)

These dependencies are missing for tv_grab_de_tvtoday:

HTML::Entities (version 1.27 or higher)
HTML::TreeBuilder

Do you wish to install tv_grab_de_tvtoday? [yes,no (default=no)] 
* Grabber for Sweden (tv_grab_se)

These dependencies are missing for tv_grab_se:

XML::LibXML

Do you wish to install tv_grab_se? [yes,no (default=no)] 
* Grabber for France (tv_grab_fr)

These dependencies are missing for tv_grab_fr:

HTML::Entities (version 1.27 or higher)
HTML::TreeBuilder

Do you wish to install tv_grab_fr? [yes,no (default=no)] 
* Grabber for Norway (tv_grab_no)

These dependencies are missing for tv_grab_no:

HTML::Entities (version 1.27 or higher)
HTML::LinkExtractor
HTML::TableExtract

Do you wish to install tv_grab_no? [yes,no (default=no)] 
* Grabber for Portugal (tv_grab_pt)

These dependencies are missing for tv_grab_pt:

HTML::TreeBuilder

Do you wish to install tv_grab_pt? [yes,no (default=no)] 
* Program to report exceptions and changes in a schedule (tv_check)

These dependencies are missing for tv_check:

Tk
Tk::TableMatrix

Do you wish to install tv_check? [yes,no (default=no)] 
* CGI program to filter listings (to install manually) (tv_pick_cgi)

These dependencies are missing for tv_pick_cgi:

CGI

Do you plan to run tv_pick_cgi? [yes,no (default=no)] Module Date::Manip seems not to be installed.
Module LWP seems not to be installed.
Module XML::Parser seems not to be installed.
Module XML::Twig seems not to be installed.
Module XML::Writer seems not to be installed.
Module Lingua::EN::Numbers::Ordinate seems not to be installed.
Module Lingua::Preferred seems not to be installed.
Module Term::ProgressBar seems not to be installed.
Module Unicode::String seems not to be installed.
Required modules missing, 'make' is unlikely to work
Warning: prerequisite Date::Manip 5.42 not found.
Warning: prerequisite LWP 5.65 not found.
Warning: prerequisite XML::Parser 2.34 not found.
Warning: prerequisite XML::Twig 3.1 not found.
Warning: prerequisite XML::Writer 0.4.6 not found.
Date::Manip 5.42 is required.
LWP 5.65 is required.
XML::Parser 2.34 is required.
XML::Twig 3.1 is required.
XML::Writer 0.4.6 is required.
Lingua::EN::Numbers::Ordinate is recommended.
Lingua::Preferred 0.2.4 is recommended.
Term::ProgressBar 2.03 is recommended.
Unicode::String is recommended.
Checking if your kit is complete...
Looks good
bad makefile line: '	$(NOECHO) $(NOOP)' at Makefile.PL line 944.
Warning: No success on command[/usr/local/bin/perl Makefile.PL]
  EDAVIS/xmltv-0.5.33.tar.gz
  /usr/local/bin/perl Makefile.PL -- NOT OK

How to resolve this problem ?

Garbage in /tmp

$ docker run -it --rm perl:5 /bin/bash
root@997cd2767d48:~# cat /tmp/L9sh12pSKR
--- 'this is a string'

---
- 1
- 2
- 3
- 4
- 5

---
alpha: beta
gamma: delta
root@997cd2767d48:~# ls -al /tmp
total 16
drwxrwxrwt 1 root root 158 Feb 17 14:57 .
drwxr-xr-x 1 root root 174 Feb 27 15:23 ..
-rw------- 1 root root  76 Feb 17 14:55 L9sh12pSKR
-rw------- 1 root root  26 Feb 17 14:55 YAML-Tiny-test-ZMaopgIF
-rw------- 1 root root  32 Feb 17 14:55 YAML-Tiny-test-mohloFyk
-rw------- 1 root root  30 Feb 17 14:55 YAML-Tiny-test-sqTpSwoa
root@997cd2767d48:~#

I don't think any of this should be in the image... Probably leftovers from running tests?

5.24.4 and 5.26.2

Oops, missed the memo on these releases last April 14. Get some tuits for this very soon.

Considering cpm

I'm thinking of adding App::cpm as either another CPAN tool on the standard images, or on its own Docker image tag (e.g. perl:5.28-cpm.)

@skaji @miyagawa what do you think?

Use HTTPS to fetch App-cpanminus

These should be updated to use HTTPS.
I'm sorry that I can't provide a PR myself, generate.pl was always messing with my local Git config.

docker-perl/generate.pl

Lines 85 to 88 in 0cb4fc3

# sha256 taken from http://www.cpan.org/authors/id/M/MI/MIYAGAWA/CHECKSUMS
my %cpanm = (
name => "App-cpanminus-1.7044",
url => "http://www.cpan.org/authors/id/M/MI/MIYAGAWA/App-cpanminus-1.7044.tar.gz",

Docker images presumes root-user inside container

The docker images on docker hub presume to run as root -- specifically, the workingDir in docker is set to /root/

The main problem with this is that many kubernetes clusters prevent processes from running as root (even inside containers) for security reasons both related to container breakout and permissions for files on network drives. To complicate this further, the official kubernetes examples made by Google [1] use your images and hence do not work on many clusters.

You can recreate the problem locally using a Dockerfile with these contents:

from perl RUN groupadd -r perl && useradd --no-log-init -r -g perl perl USER perl

You will then see the error related to trying to run from /root/:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "chdir to cwd (\"/root\") set in config.json failed: permission denied": unknown.

  1. https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/#running-an-example-job

Installation of cpanm is potentially insecure

Currently, the Dockerfiles fetch "cpanm" from the "master" branch on miyagawa's github account.

This means that if github or miyagawa's account is (unknowingly) compromised at the time the Docker images are built, all Perl(-based) images will contain a compromised version of cpanm.

It also makes the images non-reproducible (see https://reproducible-builds.org/ for why this is a good idea)

The sha256 of the downloaded Perl .tar.gz is already checked, for the same reasons.

perl utf8 and docker container

Hi,
Is perl already installed in a docker container or do I have to seperately install it with other software tools.

I have the following dockerfile

`FROM ubuntu
RUN apt-get -qq update
RUN apt-get -qqy install python git ipython

set locale

RUN locale-gen en_US.UTF-8
ENV LC_ALL=en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

RUN mkdir -p /opt
WORKDIR /opt

ENV PYTHONPATH /opt/python-code
ENV PATH /opt/python-code/extra-scripts:$PATH

ENV PERL5LIB /usr/local/perl

ADD go.py /opt/
ADD go.sh /opt/

WORKDIR /opt

CMD /bin/bash`

As you can notice I do not "RUN perl" for installation. But when I open the interactive container generated on running the image obtained by the following build process. I can see that I have perl v5.22.1 in the container.

Also my python dictionary array is not being read by perl and is giving me a string error (I have checked the synatx it is correct. The code runs fine outside docker).

I belive there is some unicode incorrect when passing array from python to perl, which is belonging to an external library function.
That is why I have set locale to UTF-8 in my docker file.

I can also observe these changes made in my container, as follows;

"Env": [ "PATH=/opt/python-code/extra-scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "LC_ALL=en_AU.UTF-8", "LANG=en_AU.UTF-8", "LANGUAGE=en_AU.UTF-8", "PYTHONPATH=/opt/python-code", "PERL5LIB=/usr/local/perl" ],

But I still get the same error. I am wondering if there is a way to check if perl5 is indeed set to UTF-8.
Or how can I set it to UTF-8 using the dockerfile.

I am not sure yet if this is caused by other issue.

I am running docker on windows10 with hypervisor V.

Any input appreciated.

Cheers

Talking to docker using Synology NAS

Hi creators, loving this package, works great. I don't know if you have synology experience, but you will have docker experience. What I'm doing is running a perl script (from a sh file) inside a bash terminal window inside docker. I run it like "./file.sh". This works like a charm.

My next step is to automatically run this file from 'outside' the docker. I want to use synology task scheduler to run the command:
docker exec -it container_name bash ./file.sh

However, this doesn't seem to work as I can't see the bash window start and my file doesn't create an output like it's meant to. Can you help me figure out how to do this?

more historical versions?

It would be very handy to have more versions of perl available for testing on legacy perls. What do you think about making that part of the official repo vs having it rolled somewhere else?

[ support ] Where would PERL5LIB default on this image?

Hi,

I try to use this image in Gitlab-CI. I have this question about the default location of PERL5LIB if I don't set it by myself. I mean, if I do something like cpanm Mojolicious, will the modules install in /usr/local/lib/perl5?

Thanks.

`onbuild` variant

Several language/toolchain images now have an onbuild variant to help jumpstart derivative images. Might be useful here for Perl especially as the base Perl images are relatively larger than others.

Particular examples might be web framework images derived from this image, which in turn might also use onbuild for the user's own custom app images.

Unable to add Perl module WWW::Curl to Docker/Perl app

I am trying to build a perl-app using the Docker image and the module WWW::Curl, but installation of WWW::Curl fails in this environment.
My Dockerfile is:
FROM perl:latest
RUN apt-get install -y \
libcurl4-openssl-dev \
libcurl4
RUN cpanm --verbose WWW::Curl::Easy

The error is:
The version is libcurl 7.64.0
Cannot find curl.h - cannot build constants files - see Makefile.PL at Makefile.PL line 96.

Set PERL5LIB to /usr/lib in perl/stretch-slim (maybe others)

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?

`$Config{vendorlib}` unset?

Running perl -MConfig -e 'print $Config{vendorlib}' in the container returns an empty string. It should return a path.

Install SOAP::Lite in perl container

I want to install SOAP::Lite module in my perl container.
I'm using this Dockerfile below:

COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
RUN apt-get update
RUN apt-get install -y libdatetime-perl
RUN apt-get install -y libdbi-perl
RUN apt-get install -y libsoap-lite-perl
RUN apt-get install -y apache2*
RUN cpanm DBI
RUN cpanm DateTime
RUN cpanm SOAP::Lite

But I always got an message:

Please tell me where I can find your apache src
[../apache_x.x/src] ../apache_x.x/src
Can't stat `../apache_x.x/src'

How to give the correct path of apache in the Dockerfile?

$! not set properly for unlink on < 5.18

I found a bug today switching Test::MockFile over to github actions.

https://github.com/cpanel/Test-MockFile/runs/418056154?check_suite_focus=true

You can see the test failure here:

2020-01-30T21:04:02.1945833Z t/touch.t .. 
2020-01-30T21:04:02.1947864Z # Seeded srand with seed '20200130' from local date.
2020-01-30T21:04:02.1955248Z # -------------- REAL MODE --------------
2020-01-30T21:04:02.1956268Z ok 1 - /tmp/OkmKzp4LAr is there
2020-01-30T21:04:02.1957157Z ok 2 - unlink on a dir fails
2020-01-30T21:04:02.1958021Z not ok 3 - unlink /dir is non-zero (0)
2020-01-30T21:04:02.1958467Z 
2020-01-30T21:04:02.1959272Z # Failed test 'unlink /dir is non-zero (0)'
2020-01-30T21:04:02.1960789Z # at t/touch.t line 20.
2020-01-30T21:04:02.1961664Z # -------------- MOCK MODE --------------
2020-01-30T21:04:02.1962537Z ok 4 - unlink /link works.
2020-01-30T21:04:02.1963361Z ok 5 - /link is now gone
2020-01-30T21:04:02.1964188Z not ok 6 -    ... and throws a $!
2020-01-30T21:04:02.1964668Z 
2020-01-30T21:04:02.1965141Z # Failed test '   ... and throws a $!'
2020-01-30T21:04:02.1965452Z # at t/touch.t line 35.
2020-01-30T21:04:02.1965915Z # +-----+----+-------+
2020-01-30T21:04:02.1966217Z # | GOT | OP | CHECK |
2020-01-30T21:04:02.1966670Z # +-----+----+-------+
2020-01-30T21:04:02.1966992Z # | 21  | eq | 0     |
2020-01-30T21:04:02.1967450Z # +-----+----+-------+
2020-01-30T21:04:02.1967938Z ok 7 - touch /dir doesn't work.
2020-01-30T21:04:02.1968441Z ok 8 - touch /link doesn't work.
2020-01-30T21:04:02.1968925Z ok 9 - Set mtime to 1970
2020-01-30T21:04:02.1969398Z ok 10 - Set ctime to 1970
2020-01-30T21:04:02.1969887Z ok 11 - Set atime to 1970
2020-01-30T21:04:02.1970385Z ok 12 - Touch a missing file.
2020-01-30T21:04:02.1970873Z ok 13 - mtime is set.
2020-01-30T21:04:02.1971343Z ok 14 - ctime is set.
2020-01-30T21:04:02.1971822Z ok 15 - atime is set.
2020-01-30T21:04:02.1972644Z ok 16 - /file exists with -e
2020-01-30T21:04:02.1973184Z ok 17 - /file is removed via unlink method
2020-01-30T21:04:02.1973697Z ok 18 - /file is missing via contents check
2020-01-30T21:04:02.1976357Z ok 19 - /file is missing via size method
2020-01-30T21:04:02.1976755Z ok 20 - /file is removed via -e check
2020-01-30T21:04:02.1977039Z ok 21 - Set file to have stuff in it.
2020-01-30T21:04:02.1977313Z ok 22 - Touch an existing file.
2020-01-30T21:04:02.1977577Z ok 23 - mtime is set to 1234.
2020-01-30T21:04:02.1977849Z ok 24 - ctime is set to 1234.
2020-01-30T21:04:02.1978135Z ok 25 - atime is set to 1234.
2020-01-30T21:04:02.1978243Z 1..25
2020-01-30T21:04:02.1978332Z Dubious, test returned 2 (wstat 512, 0x200)
2020-01-30T21:04:02.1978438Z Failed 2/25 subtests 
2020-01-30T21:04:02.1978488Z 
2020-01-30T21:04:02.1978590Z Test Summary Report
2020-01-30T21:04:02.1978846Z -------------------
2020-01-30T21:04:02.1978953Z t/touch.t (Wstat: 512 Tests: 25 Failed: 2)
2020-01-30T21:04:02.1979047Z   Failed tests:  3, 6

The issue appears to be that $! is not set when unlink is tried on a directory.

I simplified this problem to do: mkdir -p /tmp/foo; ls -ld /tmp/foo; perl -E'CORE::unlink "/tmp/foo"; print $! + 0; print "\n"'; ls -ld /tmp/foo

On everything above 5.18, I get:

drwxr-xr-x 2 root root 4096 Jan 30 21:45 /tmp/foo
21
drwxr-xr-x 2 root root 4096 Jan 30 21:45 /tmp/foo

On everything at and below 5.18, I get:

drwxr-xr-x 2 root root 4096 Jan 30 21:45 /tmp/foo
0
drwxr-xr-x 2 root root 4096 Jan 30 21:45 /tmp/foo

For whatever reason, perl is broken subtly on the older perls OR jesse is a problem?

FEATURE: Create Docker containters with updated core modules

There is a long list of modules that have a dual life in core and on CPAN, and having a Perl with all of those upgraded to the current stable version would ease and encourage upgrades. Consider creating Docker container variants that already have all of the core modules upgraded to the latest equivalents on CPAN.

Switch base image to buster/buster+bullseye for next major Perl release

cf docker-library/official-images#8405 docker/docker-ce-packaging#476 (comment)

I'll echo my reply to the linked official-images PR above:

Speaking on behalf of library/perl, we'll likely continue with using stretch+buster for the current supported perl:5.32 (latest) and perl:5.30 tags, in line with perlpolicy, along with the current best-effort-supported perl:5.28. Older Perl releases (5.26 and below) are no longer supported and are also no longer rebuilt here anyway (but we will retain their existing Dockerfiles in https://github.com/Perl/docker-perl should anyone need them.)

We will switch to buster+bullseye (or buster only if bullseye hasn't been released yet,) for whatever comes next, be it perl:5.34 or perl:7.

Docker image build fails test for perl<5.20 on CentOS 7.1 with SELinux=enforcing

Docker builds of Perl less than 5.20 on CentOS 7.1.1503 when SELinux is set to "enforcing" (SELINUX=enforcing) tests fail with these errors during test:

$ getenforce 
Enforcing
$ cd docker-perl/5.010.001-64bit/
$ docker build -t perl:5.10 .

...

#   Failed test 'queue a message'
#   at ../ext/IPC-SysV/t/ipcsysv.t line 165.
# The failure of the subtest #2 may indicate that the message queue
# resource limits either of the system or of the testing account
# have been reached.  Error message "Operating would block" is
# usually indicative of this situation.  The error message was now:
# "Permission denied"
#
# You can check the message queues with the 'ipcs' command and
# you can remove unneeded queues with the 'ipcrm -q id' command.
# You may also consider configuring your system or account
# to have more message queue resources.
#
# Because of the subtest #2 failing also the substests #5 and #6 will
# very probably also fail.

#   Failed test 'message get call'
#   at ../ext/IPC-SysV/t/ipcsysv.t line 196.
# This failure was to be expected because the subtest #2 failed.
#   Failed test 'message get data'
#   at ../ext/IPC-SysV/t/ipcsysv.t line 214.
# Looks like you failed 3 tests of 38.
../ext/IPC-SysV/t/ipcsysv.t ......................................

The issue appears to be with the version of the IPC::SysV module included in the Perl distribution, as the latest version of IPC::SysV (via CPAN) does compile and pass tests independently with SELINUX=enforcing.

Docker builds for 5.16 and 5.10 have been confirmed to run successfully on CentOS 7.1 when SELinux is disabled (SELINUX=disabled).

Prep for 5.32

Perl 5.32 is out, just awaiting for the source tarball to show up in the canonical location at https://www.cpan.org/src/5.0/

Just a preview:

...
Step 7/7 : CMD ["perl5.32.0","-de0"]
 ---> Running in 12a1a3862332
Removing intermediate container 12a1a3862332
 ---> 84a801177065
Successfully built 84a801177065
Successfully tagged perl:5.32
~/src/docker-perl/5.032.000-main-buster $ docker run --rm -it perl:5.32 /bin/bash
root@5bb1c5d2f4a9:/# perl -V
Summary of my perl5 (revision 5 version 32 subversion 0) configuration:
   
  Platform:
    osname=linux
    osvers=4.4.227
    archname=x86_64-linux-gnu
    uname='linux 12ac5b83ecc9 4.4.227 #2 smp thu jun 11 15:07:16 cdt 2020 x86_64 gnulinux '
    config_args='-Darchname=x86_64-linux-gnu -Duse64bitall -Duseshrplib -Dvendorprefix=/usr/local -des'
...

Issues with cdn-fastly.deb.debian.org

Hello,

I was using perl 5.24, but from version 5.24.1 to 5.24.2 the apt repo changed from where packages were downloaded from http://deb.debian.org/debian/ to http://cdn-fastly.deb.debian.org/debian/. This change is causing certain packages to not be available. For example libmysqlclient-dev I'm getting the following error on 5.24.2:

E: Package 'libmysqlclient-dev' has no installation candidate

This worked on 5.24.1.

Avoid sha1 for consistency check

SHA-1 is broken, so it would be nice to use 'sha256sum' or higher for verifying that we have downloaded the correct binary!

Thanks,

Update old images on Docker Hub to schema 2

I use Perl images from Docker Hub for CI purposes, using GitLab-CI, in one of my projects. We run tests for a few different Perl version but the oldest one we support is 5.14. Recently I attempted to speed CI builds up by pre-installing all the dependencies onto the relevant Perl images instead of having it done every job. In principle this too has worked fine, however when I attempted to delegate the image building to GitLab-CI as well I found out that Kaniko refuses to work with perl:5.14-threaded. From what I could tell the problem lies with the fact that the image in question uses schema 1 whereas Kaniko devs have decided to only support schema 2.

Would it be possible to have older Perl images on Docker Hub updated to schema 2? According to the discussion from GoogleContainerTools/kaniko#509 all one has to do is pull such an image using a new-enough version of Docker and push it back to the Hub.

/usr/bin/ld: cannot find -lperl

I am trying to install Image:;Magick in the docker file
I see that libperl.so is available here /usr/local/lib/perl5/5.30.2/x86_64-linux-gnu/CORE/libperl.so

FROM perl:5.30-slim-buster

RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    build-essential \
    libmagick++-dev && \
    cp /usr/include/x86_64-linux-gnu/ImageMagick-6/magick/magick-baseconfig.h /usr/include/ImageMagick-6/magick/

RUN find / -name libperl.so
RUN cpanm -v Image::Magick

But i get this error when linking

chmod 644 "Magick.bs"
"/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Magick.bs blib/arch/auto/Image/Magick/Magick.bs 644
"/usr/local/bin/perl" "/usr/local/lib/perl5/5.30.2/ExtUtils/xsubpp" -typemap '/usr/local/lib/perl5/5.30.2/ExtUtils/typemap' -typemap '/root/.cpanm/work/1591346327.6/PerlMagick-6.89/typemap' Magick.xs > Magick.xsc
mv Magick.xsc Magick.c
cc -c -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/usr/include/ImageMagick-6" -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2 -DVERSION="6.89" -DXS_VERSION="6.89" -fPIC "-I/usr/local/lib/perl5/5.30.2/x86_64-linux-gnu/CORE" -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
rm -f blib/arch/auto/Image/Magick/Magick.so
LD_RUN_PATH="/usr/lib/x86_64-linux-gnu" cc -L/usr/local/lib -lMagickCore-6.Q16 -shared -O2 -L/usr/local/lib -fstack-protector-strong Magick.o -o blib/arch/auto/Image/Magick/Magick.so
-L/usr/local/lib -lMagickCore-6.Q16 -lperl -lm \

/usr/bin/ld: cannot find -lperl

/root/.cpanm

/root/.cpanm takes about 5.9MB. It is better remove it.

Wishlist: cpanminus installed by default

I wonder if a usable cpanm should be already included in the image? Of course, the end user can just install manually via

curl -L http://cpanmin.us | perl - App::cpanminus

but this might be an insecure approach, as explained here.

I realize the older cpan and cpanp tools are already included, and it is quite possible to bootstrap cpanm via these tools, but on the other hand cpanm is already small enough to be another addition. Also, most new Perl projects make use of cpanm as their standard installer command, especially projects that make use of the cpanfile format for dependency tracking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.