-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.Base
104 lines (86 loc) · 3.33 KB
/
Dockerfile.Base
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
# FROM buildpack-deps:precise
FROM ubuntu:12.04
MAINTAINER Bo Gao <bogao@dcs.warwick.ac.uk>
# A. Install OS-level dependencies
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
curl \
procps \
ncbi-blast+ \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
autoconf \
automake \
imagemagick \
libbz2-dev \
libcurl4-openssl-dev \
libdb-dev \
libevent-dev \
libffi-dev \
libgeoip-dev \
libglib2.0-dev \
libjpeg-dev \
liblzma-dev \
libmagickcore-dev \
libmagickwand-dev \
libmysqlclient-dev \
libncurses-dev \
libpng-dev \
libpq-dev \
libreadline-dev \
libsqlite3-dev \
libssl-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
libyaml-dev \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/*
## Ref: https://github.com/docker-library/buildpack-deps/blob/e7534be05255522954f50542ebf9c5f06485838d/precise/Dockerfile
# B. Install Perl modules
## B1. CPAN modules
RUN cd /usr/src \
&& curl -LO https://raw.githubusercontent.com/miyagawa/cpanminus/master/cpanm \
&& chmod +x cpanm \
&& ./cpanm App::cpanminus \
&& rm -fr ./cpanm /root/.cpanm /usr/src/perl /tmp/*
# RUN curl -L https://cpanmin.us | perl - --sudo App::cpanminus
# RUN cpan App::cpanminus
RUN mkdir /apples
ADD ./cpanfile /apples/cpanfile
RUN cd /apples \
&& cpanm --notest --installdeps .
## B2. Non-CPAN modules (Ensemble API, Ensemblegenomes API and BioPerl)
# Ref: https://github.com/bogaotory/docker-perl-bio
ENV LIB_NCPAN_PERL /root/lib-perl
RUN mkdir $LIB_NCPAN_PERL
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
git \
&& rm -rf /var/lib/apt/lists/*
RUN cd $LIB_NCPAN_PERL \
&& git clone https://github.com/Ensembl/ensembl-git-tools.git \
&& echo 'export PATH="'$LIB_NCPAN_PERL'/ensembl-git-tools/bin:$PATH"' >> /root/.profile
RUN . /root/.profile \
&& cd $LIB_NCPAN_PERL \
&& git ensembl --clone api \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/ensembl/modules:$PERL5LIB"' >> /root/.profile \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/ensembl-compara/modules:$PERL5LIB"' >> /root/.profile \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/ensembl-funcgen/modules:$PERL5LIB"' >> /root/.profile \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/ensembl-io/modules:$PERL5LIB"' >> /root/.profile \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/ensembl-variation/modules:$PERL5LIB"' >> /root/.profile
RUN cd $LIB_NCPAN_PERL \
&& git clone git://github.com/bioperl/bioperl-live.git \
&& git clone https://github.com/bioperl/Bio-EUtilities.git \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/bioperl-live:$PERL5LIB"' >> /root/.profile \
&& echo 'export PERL5LIB="'$LIB_NCPAN_PERL'/Bio-EUtilities/lib:$PERL5LIB"' >> /root/.profile
# ENV HOSTNAME=gs
ENV PERL5LIB $LIB_NCPAN_PERL/ensembl/modules:$LIB_NCPAN_PERL/ensembl-compara/modules:$LIB_NCPAN_PERL/ensembl-funcgen/modules:$LIB_NCPAN_PERL/ensembl-io/modules:$LIB_NCPAN_PERL/ensembl-variation/modules:$LIB_NCPAN_PERL/bioperl-live:$LIB_NCPAN_PERL/Bio-EUtilities/lib
ADD . /apples
# RUN cachebuster=b953b3
# ADD . /apples
# WORKDIR /apples
# WORKDIR /root