forked from thehyve/cbioportal-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
54 lines (46 loc) · 2.21 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
#
# 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 <[email protected]>
# install build and runtime dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
libmysql-java \
maven \
openjdk-8-jdk="$JAVA_DEBIAN_VERSION" \
patch \
python \
python-jinja2 \
python-mysqldb \
python-requests \
&& rm -rf /var/lib/apt/lists/* \
# set up Tomcat to use the MySQL Connector/J Java connector
&& ln -s /usr/share/java/mysql-connector-java.jar "$CATALINA_HOME"/lib/ \
# remove the example apps that come with Tomcat for security reasons
&& rm -rf $CATALINA_HOME/webapps/examples/
# fetch the cBioPortal sources and version control metadata
ENV PORTAL_HOME=/cbioportal
RUN git clone --single-branch -b v1.2.5 'https://github.com/cBioPortal/cbioportal.git' $PORTAL_HOME
WORKDIR $PORTAL_HOME
#RUN git fetch https://github.com/thehyve/cbioportal.git uniprot_accession_in_maf_rebased \
# && git checkout FETCH_HEAD
# add buildtime configuration
COPY ./portal.properties.patch /root/
# install default config files, build and install
RUN cp src/main/resources/portal.properties.EXAMPLE src/main/resources/portal.properties \
&& patch src/main/resources/portal.properties </root/portal.properties.patch \
&& cp src/main/resources/log4j.properties.EXAMPLE src/main/resources/log4j.properties \
&& mvn -DskipTests clean install \
&& mv portal/target/cbioportal.war $CATALINA_HOME/webapps/
# 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