FROM statonlab/tripal3
MAINTAINER Zhang Xudong <zhangxudong@genek.cn>

USER root

WORKDIR /var/www/html

RUN set -x \
	# Enable tripal_analysis_blast
	&& drush dl -y tripal_analysis_blast \
	# Enable cdetitor and views
	&& drush dl -y ckeditor \
	## && drush en -y ckeditor views_ui \
	# Tripal Daemon
 	&& cd /var/www/html/sites/all/libraries \
	## && wget https://github.com/shaneharter/PHP-Daemon/archive/v2.0.tar.gz \
	&& wget ftp://gsx.genek.tv/Share/linux_software/PHP-Daemon-2.0.tar.gz \
	## && tar -zxvf v2.0.tar.gz \
	&& tar -zxvf PHP-Daemon-2.0.tar.gz \
	&& mv PHP-Daemon-2.0 PHP-Daemon \
	## && rm v2.0.tar.gz \
	&& rm PHP-Daemon-2.0.tar.gz \
	&& cd /var/www/html \
	&& drush dl drushd \
	## && drush en -y drushd tripal_daemon \
	# Blast
	&& cd /opt \
	&& wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.11.0+-x64-linux.tar.gz \
	&& tar -zxvf ncbi-blast-2.11.0+-x64-linux.tar.gz \
	&& rm ncbi-blast-2.11.0+-x64-linux.tar.gz \
	&& cd /var/www/html \
	&& git clone http://git.genek.cn:3333/zhxd2/tripal_blast.git sites/all/modules/tripal_blast \
##	&&drush en -y blast_ui \
	# JBrowse
	&& yum-config-manager --disable pgdg94 \
##	&& yum update -y \
##	&& yum upgrade -y perl \
	&& yum groupinstall -y "Development Tools" \
	&& yum install -y zlib-devel perl-ExtUtils-MakeMaker \
	&& mkdir tools \
	&& cd tools \
	## && wget https://github.com/GMOD/jbrowse/releases/download/1.16.11-release/JBrowse-1.16.11.zip \
	&& wget ftp://gsx.genek.tv/Share/linux_software/JBrowse-1.16.11.zip \
	&& unzip JBrowse-1.16.11.zip \
	&& mv JBrowse-1.16.11 JBrowse \
	&& cd JBrowse \
	&& ./setup.sh \
	&& rm ../JBrowse-1.16.11.zip \
	&& cd /var/www/html \
	&& git clone http://git.genek.cn:3333/zhxd2/tripal_jbrowse.git sites/all/modules/tripal_jbrowse \
##	&& drush en -y tripal_jbrowse_mgmt tripal_jbrowse_page \
	&& mkdir -p mydata/raw mydata/blast mydata/jbrowse

RUN cd /var/www/html/sites/all/modules \
	&& git clone https://gitlab.com/mainlabwsu/chado_search.git \
	&& cd chado_search/file \
	&& cp default.settings.txt settings.conf
##	&& drush pm-enable chado_search


##EXPOSE 80 5432

##ENTRYPOINT ["init.sh"]
