使用Docker安装Perl [英] Perl installation using docker

查看:324
本文介绍了使用Docker安装Perl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用perl安装来构建docker映像.但遇到make命令的问题.它说找不到makefile.Dockerfile:

I am trying to build the docker image with perl installation. but facing issues with the make command. it says No makefile found. 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

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

Can anyone help me fix it.

推荐答案

正如自述文件所述,只需运行 make ,但将目录更改为源代码的根目录(/shared/perl-5.22.1):

As the README says, simply run make, but change directory to the root of the source code (/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

这篇关于使用Docker安装Perl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆