Install Perl Modules


Install a perl module using *apt-get*


examples/perl-mechanize/Dockerfile
FROM ubuntu:20.04
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y libtest-www-mechanize-perl

examples/perl-mechanize/get.pl
use 5.010;
use strict;
use warnings;

use WWW::Mechanize;

my ($url) = @ARGV;
die "Usage: $0 URL\n" if not $url;

my $w = WWW::Mechanize->new;

$w->get($url);
say $w->content;

$ docker run -v /Users/gabor/work/mydocker:/opt/  mydocker perl /opt/get.pl
Usage: /opt/get.pl URL


docker run -v /Users/gabor/work/mydocker:/opt/  mydocker perl /opt/get.pl http://perlmaven.com/