-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile_NoPerlbrew
123 lines (103 loc) · 3.51 KB
/
Dockerfile_NoPerlbrew
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM ubuntu:24.04
LABEL org.opencontainers.image.authors="vladimir.mikryukov@ut.ee;kessy.abarenkov@ut.ee"
## Use bash instead of sh
SHELL ["/bin/bash", "-c"]
ARG DEBIAN_FRONTEND="noninteractive"
ENV TZ=UTC
## Assign variables with perl path
## Assign read and execute access for everyone (+ write access for the owner) to the /opt dir
RUN chmod -R 755 /opt
## cpanm default options
ENV PERL_CPANM_OPT="--notest --skip-satisfied"
## Install the required dependencies
RUN apt-get update -y \
&& apt-get install -y software-properties-common \
&& add-apt-repository universe \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y \
software-properties-common \
python3 python3-pip \
zip unzip \
curl git wget less gawk \
build-essential ca-certificates \
cpanminus \
make cmake libtool automake autoconf pkg-config \
libffi-dev zlib1g-dev libminizip-dev libexpat1-dev libssl-dev \
libarmadillo-dev libpoppler-dev liblzma-dev \
libkml-dev libfreexl-dev libogdi-dev \
libgdal-dev gdal-bin \
libgeos-dev librttopo-dev \
libsqlite3-dev sqlite3 \
locales language-pack-fi language-pack-en && \
export LANGUAGE=en_US.UTF-8 && \
export LANG=en_US.UTF-8 && \
export LC_ALL=en_US.UTF-8 && \
locale-gen en_US.UTF-8 && \
dpkg-reconfigure locales \
&& apt-get autoremove -y \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/*
# libepsilon-dev
## Install modules
RUN cpanm \
rlib@0.02 \
ExtUtils::Embed@1.35 \
Catalyst::Devel@1.42 \
Module::Compile@0.38 \
FFI::Build::MM@2.10 \
FFI::Platypus@2.10 \
List::Util@1.68 \
List::MoreUtils@0.430 \
PDL@2.098 \
Test2::Harness@1.000155 \
Text::CSV@2.05 \
Text::CSV_XS@1.59 \
Excel::ValueReader::XLSX@1.15 \
Alien::Build@2.84 \
Alien::freexl@1.06 \
Alien::libtiff@1.02 \
Alien::cmake3@0.08 \
Alien::sqlite@1.07 \
Alien::patch@0.15 \
Alien::patchelf@0.08 \
FFI::Platypus::Declare@1.34 \
Alien::geos::af@1.012 \
Alien::proj@1.30
# Faster::Maths@0.02 \
RUN cpanm \
Alien::spatialite@1.09 \
Alien::gdal@1.39
## Export LD_LIBRARY_PATH and install Geo::GDAL::FFI
RUN export LD_LIBRARY_PATH=`perl -MAlien::geos::af -E'print Alien::geos::af->dist_dir . q{/lib}'` \
&& cpanm Geo::GDAL::FFI@0.12
WORKDIR /opt
## Download Biodiverse repo (pull only the latest commit from GitHub)
## Latest commit from the master branch (development version)
RUN git clone --depth 1 https://github.com/shawnlaffan/biodiverse.git
WORKDIR "biodiverse"
## Get the updated `cpanfile` with fixed module versions
RUN wget https://raw.githubusercontent.com/vmikk/biodiverse-docker/main/cpanfile -O cpanfile
## Install Biodiverse + deps for the current directory
RUN cpanm --installdeps .
## Install remaining modules
RUN cpanm \
Data::Recursive@1.1.0 \
Getopt::Long::Descriptive@0.116 \
List::BinarySearch@0.25 \
LWP::Protocol::https@6.14 \
Inline::Module@0.34
## Install Biodiverse Utils
RUN cpanm https://github.com/shawnlaffan/biodiverse-utils/releases/download/v1.11/Biodiverse-Utils-1.11.tar.gz
## Default @INC
# /etc/perl
# /usr/local/lib/x86_64-linux-gnu/perl/5.30.0
# /usr/local/share/perl/5.30.0
# /usr/lib/x86_64-linux-gnu/perl5/5.30
# /usr/share/perl5
# /usr/lib/x86_64-linux-gnu/perl/5.30
# /usr/share/perl/5.30
# /usr/local/lib/site_perl
# /usr/lib/x86_64-linux-gnu/perl-base
## Add Biodiverse to Perl's @INC
ENV PERL5LIB="/opt/biodiverse/lib"