-
Notifications
You must be signed in to change notification settings - Fork 48
/
Dockerfile-Perl
75 lines (58 loc) · 3.72 KB
/
Dockerfile-Perl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
FROM ubuntu:16.04
ARG HTTPS_PROXY
ARG HTTP_PROXY
ARG https_proxy
ARG http_proxy
ARG no_proxy
ENV https_proxy=${https_proxy}
ENV http_proxy=${http_proxy}
ENV HTTP_PROXY=${HTTP_PROXY}
ENV HTTPS_PROXY=${HTTPS_PROXY}
ENV no_proxy=${no_proxy}
ENV NO_PROXY=${NO_PROXY}
ENV no_proxy="elastic,mongodb,scot,activemq,apache"
ENV NO_PROXY="elastic,mongodb,scot,activemq,apache"
COPY docker-configs/perl/ /opt/scot/perl/
RUN apt-get update && \
apt-get -qy upgrade && \
apt-get install -qy software-properties-common perl build-essential cpanminus perl-doc perl-base perl-modules curl vim ssmtp wget && \
cat /opt/scot/perl/libs.txt | xargs apt-get install -qy && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*, /tmp/*, /var/tmp/*
RUN add-apt-repository http://ppa.launchpad.net/maxmind/ppa/ubuntu && \
apt-get update && \
apt-get install -y --allow-unauthenticated libgeoip-dev libmaxminddb0 libmaxminddb-dev mmdb-bin pwgen
#Install CPAN modules
COPY docker-scripts/install_perl_modules.sh /opt/scot/perl/
#RUN bash /opt/scot/perl/install_perl_modules.sh
RUN cpanm --force Array::Split Data::Dumper Data::Dumper::HTML Data::Dumper::Concise Data::Clean Data::Clean::FromJSON Daemon::Control Net::LDAP Net::SMTP::TLS Net::Stomp \
Net::STOMP::Client Net::IDN::Encode Net::Works::Network Net::IP Moose Moose::Role Moose::Util::TypeConstraints MooseX::MetaDescription::Meta::Attribute MooseX::Singleton \
MooseX::Emulate::Class::Accessor::Fast MooseX::Types MooseX::Types::Common MooseX::MethodAttributes MooseX::Role::MongoDB@0.010 Safe Readonly DateTime DateTime::Cron::Simple \
DateTime::Format::Strptime DateTime::Format::Natural Time::HiRes Server::Starter PSGI CGI::PSGI CGI::Compile HTTP::Server::Simple::PSGI JSON JSON::XS DBI Parallel::ForkManager \
AnyEvent AnyEvent::STOMP::Client AnyEvent::ForkManager Async::Interrupt Number::Bytes::Human Sys::RunAlone Encode FileHandle File::Slurp File::Temp File::Type MIME::Base64 \
IPC::Run IO::Prompt Log::Log4perl Mail::IMAPClient Mail::IMAPClient::BodyStructure MongoDB@1.8.3 MongoDB::GridFS@1.8.3 MongoDB::GridFS::File@1.8.3 MongoDB::OID@1.8.3 \
Alien::GMP Meerkat Mojo MojoX::Log::Log4perl Mojolicious::Plugin::WithCSRFProtection Mojolicious::Plugin::TagHelpers XML::Smart Config::Auto Data::GUID File::LibMagic List::Uniq \
Domain::PublicSuffix Mozilla::PublicSuffix Crypt::PBKDF2 Config::Crontab Math::Int128 GeoIP2 Search::Elasticsearch Term::ANSIColor \
Courriel Statistics::Descriptive Net::SSH::Perl Net::SFTP Lingua::Stem Math::VecStat Class::Exporter Math::HashSum Math::Vector::SortIndexes Lingua::EN::StopWords \
XML::Twig XML::Simple SVG::Sparkline Email::Stuffer HTML::Entities HTML::Scrubber HTML::Strip HTML::StripTags HTML::TreeBuilder HTML::FromText HTML::FormatText HTML::Make
#problem modules that should be run last
RUN cpanm MaxMind::DB::Reader::XS
COPY lib/ /opt/scot/lib/
COPY bin/ /opt/scot/bin/
#install geoip
RUN cd /usr/share/GeoIP/ && \
curl -k -s -S https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz | tar -xz && mv GeoLite2-City_*/GeoLite2-City.mmdb ./GeoIP2-City.mmdb && \
curl -k -s -S https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz | tar -xz && mv GeoLite2-Country_*/GeoLite2-Country.mmdb ./GeoIP2-Country.mmdb && \
curl -k -s -S https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz | tar -xz && mv GeoLite2-ASN_*/GeoLite2-ASN.mmdb ./GeoIP2-ISP.mmdb && \
rm -rf Geo*.tar.gz
#install mozilla stuff
RUN mkdir /opt/scot/etc/ && \
bash /opt/scot/bin/download_public_suffix.sh
ENV https_proxy=
ENV http_proxy=
ENV HTTP_PROXY=
ENV HTTPS_PROXY=
ENV no_proxy=
ENV NO_PROXY=
ENV no_proxy="elastic,mongodb,scot,activemq,apache"
ENV NO_PROXY="elastic,mongodb,scot,activemq,apache"