使用docker进行Perl安装

我正在尝试用perl安装构builddocker镜像。 但是面临make命令的问题。 它说没有findmakefile。 Dockerfile:

FROM amazonlinux WORKDIR /shared RUN yum -y install gcc ADD http://www.cpan.org/src/5.0/perl-5.22.1.tar.gz /shared RUN tar -xzf perl-5.22.1.tar.gz RUN /shared/perl-5.22.1/Configure -des -Dprefix=/opt/perl-5.22.1/localperl RUN make -C /shared/perl-5.22.1 RUN make -C /shared/perl-5.22.1 test RUN make -C /shared/perl-5.22.1 install 

错误:

 Step 14/20 : ADD http://www.cpan.org/src/5.0/perl-5.22.1.tar.gz /shared Downloading 15.92 MB/15.92 MB ---> Using cache ---> 24f3b38dee5f Step 15/20 : RUN tar -xzf perl-5.22.1.tar.gz ---> Using cache ---> 42ecf82ce73d Step 16/20 : RUN /shared/perl-5.22.1/Configure -des -Dprefix=/opt/perl-5.22.1/localperl ---> Using cache ---> dfe8d71f5ff1 Step 17/20 : RUN make -C /shared/perl-5.22.1/ ---> Running in 2766b0c8e9a5 make: Entering directory `/shared/perl-5.22.1' make: Leaving directory `/shared/perl-5.22.1' make: *** No targets specified and no makefile found. Stop. The command '/bin/sh -c make -C /shared/perl-5.22.1/' returned a non-zero code: 2 ish-mac:testanalyse ish$ ls -l 

任何人都可以帮我修复它。

正如README所说,只需运行make ,但将目录切换到源代码的根目录(/shared/perl-5.22.1):

 FROM amazonlinux WORKDIR /shared RUN yum -y install gcc ADD http://www.cpan.org/src/5.0/perl-5.22.1.tar.gz /shared RUN tar -xzf perl-5.22.1.tar.gz WORKDIR /shared/perl-5.22.1 RUN ./Configure -des -Dprefix=/opt/perl-5.22.1/localperl RUN make RUN make test RUN make install 

自述:

 INSTALLATION ============ If you're using a relatively modern operating system and want to install this version of Perl locally, run the following commands: ./Configure -des -Dprefix=$HOME/localperl make test make install