-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
73 lines (69 loc) · 3.08 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
71
72
73
FROM centos:7
MAINTAINER Erich Bremer "[email protected]"
#
# QuIP - PathDB Docker Container
#
### update OS
RUN yum update -y && yum clean all
RUN yum -y install wget which zip unzip bind-utils epel-release
RUN rpm -Uvh http://mirror.usi.edu/pub/remi/enterprise/remi-release-7.rpm
#RUN yum-config-manager --disable remi-php73
RUN yum-config-manager --enable remi-php81
RUN curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | bash
RUN yum -y install httpd telnet openssl mod_ssl mod_php php-opcache php-xml php-mcrypt php-gd php-devel php-mysql php-intl php-mbstring php-uploadprogress php-pecl-zip php-ldap
RUN yum -y install mariadb-server mariadb-client git
RUN sed -i 's/;date.timezone =/date.timezone = America\/New_York/g' /etc/php.ini
RUN sed -i 's/;always_populate_raw_post_data = -1/always_populate_raw_post_data = -1/g' /etc/php.ini
# download Drupal management tools
WORKDIR /build
RUN wget https://getcomposer.org/installer
RUN php installer
RUN rm -f installer
RUN mv composer.phar /usr/local/bin/composer
COPY pathdbmysql.cnf pathdbmysql.cnf
COPY w3-theme-custom.css w3-theme-custom.css
# create initial Drupal environment
WORKDIR /
COPY quip/ quip/
COPY modules/quip/ /quip/web/modules/quip/
COPY images/ /quip/web/images/
COPY settings.php /build
COPY mysql.tgz /build
# set permissions correctly for apache demon access
RUN chown -R apache:apache /quip
# adjust location of Drupal-supporting MySQL database files
RUN sed -i 's/datadir=\/var\/lib\/mysql/datadir=\/data\/pathdb\/mysql/g' /etc/my.cnf
# increase php file upload sizes and posts
RUN sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 30G/g' /etc/php.ini
RUN sed -i 's/post_max_size = 8M/post_max_size = 30G/g' /etc/php.ini
RUN sed -i 's/;upload_tmp_dir =/upload_tmp_dir = "\/data\/tmp"/g' /etc/php.ini
RUN sed -i 's/sys_temp_dir =/sys_temp_dir = "\/data\/tmp"/g' /etc/php.ini
# set up Drupal private file area
RUN mkdir -p /data/pathdb/files
RUN chown -R apache:apache /data/pathdb/files
RUN chmod -R 775 /data/pathdb/files
# create self-signed digital keys for JWT
WORKDIR /etc/httpd/conf
RUN openssl req -subj '/CN=www.mydom.com/O=My Company Name LTD./C=US' -x509 -nodes -newkey rsa:2048 -keyout quip.key -out quip.crt
# copy over Docker initialization scripts
EXPOSE 80
COPY run.sh /root/run.sh
COPY savepathdb /root/savepathdb
COPY mysql.tgz /build
RUN mkdir /quip/config
RUN mkdir /quip/config-update
COPY config/* /quip/config/
COPY config/* /quip/config-update/
# remove local exceptions to updates
RUN rm /quip/config-update/tac_lite.settings.yml
COPY content/* /quip/content/
# download caMicroscope
WORKDIR /quip/web
ARG viewer
RUN if [ -z ${viewer} ]; then git clone https://github.com/camicroscope/caMicroscope.git --branch=v3.9.1; else git clone https://github.com/camicroscope/caMicroscope.git --branch=$viewer; fi
ARG featureMap
RUN if [ -z ${featureMap} ]; then git clone https://github.com/SBU-BMI/FeatureMap --branch=2.0.3; else git clone https://github.com/SBU-BMI/FeatureMap --branch=$featureMap; fi
RUN rm /etc/httpd/conf.d/ssl.conf
RUN chmod 755 /root/run.sh
RUN yum update -y && yum clean all
CMD ["sh", "/root/run.sh"]