forked from thehyve/cbioportal-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
56 lines (47 loc) · 2.17 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
#
# Copyright (c) 2016 The Hyve B.V.
# This code is licensed under the GNU Affero General Public License (AGPL),
# version 3, or (at your option) any later version.
#
FROM tomcat:8-jre8
MAINTAINER Fedde Schaeffer <fedde@thehyve.nl>
# install build and runtime dependencies and configure Tomcat for production
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libmysql-java \
maven \
openjdk-8-jdk \
patch \
python \
python-jinja2 \
python-mysqldb \
python-requests \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /usr/share/java/mysql-connector-java.jar "$CATALINA_HOME"/lib/ \
&& rm -rf $CATALINA_HOME/webapps/*m*
# fetch the cBioPortal sources and version control metadata
ENV PORTAL_HOME=/cbioportal
RUN git clone --depth 1 -b v1.11.3 'https://github.com/cBioPortal/cbioportal.git' $PORTAL_HOME
WORKDIR $PORTAL_HOME
#RUN git fetch --depth 1 https://github.com/thehyve/cbioportal.git my_development_branch \
# && git checkout commit_hash_in_branch
# add buildtime configuration
COPY ./portal.properties src/main/resources/portal.properties
COPY ./log4j.properties src/main/resources/log4j.properties
# install default config files, build and install, placing the scripts jar back
# in the target folder where import scripts expect it after cleanup
RUN mvn -DskipTests clean package \
&& mv portal/target/cbioportal-*.war $CATALINA_HOME/webapps/cbioportal.war \
&& mv scripts/target/scripts-*.jar /root/ \
&& mvn clean \
&& mkdir scripts/target/ \
&& mv /root/scripts-*.jar scripts/target/
# add runtime configuration
COPY ./catalina_server.xml.patch /root/
RUN patch $CATALINA_HOME/conf/server.xml </root/catalina_server.xml.patch
COPY ./catalina_context.xml.patch /root/
RUN patch $CATALINA_HOME/conf/context.xml </root/catalina_context.xml.patch
# add importer scripts to PATH for easy running in containers
RUN find $PWD/core/src/main/scripts/ -type f -executable \! -name '*.pl' -print0 | xargs -0 -- ln -st /usr/local/bin
# TODO: fix the workdir-dependent references to '../scripts/env.pl' and do this:
# RUN find $PWD/core/src/main/scripts/ -type f -executable \! \( -name env.pl -o -name envSimple.pl \) -print0 | xargs -0 -- ln -st /usr/local/bin