-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
executable file
·70 lines (59 loc) · 2.03 KB
/
Dockerfile
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
FROM maven:3.6-openjdk-11 as builder
COPY pom.xml /tmp/build/pom.xml
COPY src /tmp/build/src
COPY dependencies /tmp/build/dependencies
RUN cd /tmp/build && mvn install
FROM alpine:latest
# build from Alpine for much smaller final image
# Set working dir as /RNApeg
WORKDIR /RNApeg
# Tell the OS that this is a non-interactive frontend only for build
ARG DEBIAN_FRONTEND=noninteractive
#
# Alpine-based install:
#
RUN apk add --no-cache openjdk8-jre
# don't need full JDK, just runtime
RUN apk add --no-cache curl
RUN apk add --no-cache make
RUN apk add --no-cache gcc
RUN apk add --no-cache perl
RUN apk add --no-cache perl-utils
# for "cpan" command-line utility
RUN apk add --no-cache perl-dev
RUN apk add --no-cache musl-dev
# these two for headers required to build perl DBI module
RUN apk add --no-cache perl-doc
# required for perl "use diagnostics", used by SampleName.pm
RUN apk add --no-cache db-dev
RUN apk add --no-cache expat-dev
# required for dependencies of BioPerl
RUN apk add --no-cache openssl
RUN apk add --no-cache openssl-dev
RUN apk add --no-cache zlib
RUN apk add --no-cache zlib-dev
# required for WDL workflows to use RNApeg
RUN apk add --no-cache bash
# Install perl modules
RUN cpan App:cpanminus
RUN cpanm --no-wget Data::Compare && chown -R root:root /root/.cpanm
RUN cpanm --no-wget DB_File XML::Parser::PerlSAX XML::Twig XML::DOM
RUN cpanm --no-wget --force Bio::Tools::CodonTable
RUN cpanm --no-wget DBI
RUN cpanm --no-wget Set::IntSpan
# Put code into place
COPY src/main/scripts /RNApeg/src/bin
COPY src/main/java /RNApeg/src/javalib
COPY src/main/perllib /RNApeg/src/perllib
COPY dependencies/bin /RNApeg/src/bin
COPY dependencies/lib/java /RNApeg/src/javalib
COPY dependencies/lib/perl /RNApeg/src/perllib
COPY src/main/docker/RNApeg.sh /RNApeg/src/bin
COPY --from=builder /tmp/build/target /RNApeg/src/javalib
# Change environment variables
ENV PATH="/RNApeg/src/bin:${PATH}"
ENV PERL5LIB="/RNApeg/src/perllib:${PERL5LIB}"
ENV CLASSPATH=/RNApeg/src/javalib/*
WORKDIR /results
ENTRYPOINT ["/RNApeg/src/bin/RNApeg.sh"]
CMD ["-h"]