|
1 |
| -FROM ubuntu:16.04 |
2 |
| -LABEL maintainer= "[email protected]" |
3 |
| -ENV DEBIAN_FRONTEND noninteractive |
4 |
| - |
5 |
| -# INSTALL BASE REQUIREMENTS |
6 |
| -RUN apt-get update && \ |
7 |
| - apt-get install -y git sudo apache2 && \ |
8 |
| - cd /var/www/html && \ |
9 |
| - rm index.html |
10 |
| - |
11 |
| -# CHANGE DOCUMENT ROOT AND SERVERNAME |
12 |
| -WORKDIR /etc/apache2 |
13 |
| -RUN sed -i -e "/DocumentRoot/a \ \t\<Directory \'\/var\/www\/html\'\>\n\t\tOptions +ExecCGI\n\t\tAddHandler cgi-script .py\n\t\tAllow from all\n\t</Directory\>" sites-available/000-default.conf |
14 |
| -RUN sed -i '1 i\ServerName FORCAST' apache2.conf |
15 |
| - |
16 |
| -# GET HOST CODE |
17 |
| -COPY . /var/www/html/ |
18 |
| -WORKDIR /var/www/html/ |
19 |
| - |
20 |
| -# INSTALL DEPENDENCIES |
21 |
| -RUN cd src/installation && \ |
22 |
| - ./install.sh /var/www/html && \ |
23 |
| - ./setPermissions.sh |
| 1 | +FROM ubuntu/apache2:2.4-20.04_beta |
| 2 | +# Match Docker expectations for logging like the Docker Library nginx image |
| 3 | +RUN ln -sf /dev/stdout /var/log/apache2/access.log && \ |
| 4 | + ln -sf /dev/stderr /var/log/apache2/error.log && \ |
| 5 | +# Enable Common Gateway Interface scripts that comprise much of FORCAST's backend |
| 6 | + a2enmod cgi && \ |
| 7 | +# Enable mod_rewrite for the / homepage redirect |
| 8 | + a2enmod rewrite && \ |
| 9 | +# Disable directory listings. This is a core module, which requires --force |
| 10 | + a2dismod --force autoindex |
| 11 | +RUN apt update -y && \ |
| 12 | + apt install -y \ |
| 13 | +# MongoDB 3.6 for storing guides and primers |
| 14 | + mongodb \ |
| 15 | +# General downloads here, unzip JBrowse |
| 16 | + ca-certificates curl unzip \ |
| 17 | +# Convenient downloads for Dicey from GEAR Genomics Tracy |
| 18 | + wget rename \ |
| 19 | +# FORCAST uses both Python 2 and 3 for some reason |
| 20 | + python python3-pip \ |
| 21 | +# Bioinformatics tools used when installing new genomes |
| 22 | + bwa bedtools samtools ncbi-blast+ \ |
| 23 | +# FORCAST primer design feature after setup |
| 24 | + primer3 && \ |
| 25 | +# Remove lists pulled by apt update for consistent images |
| 26 | + rm -rf /var/lib/apt/lists/* && \ |
| 27 | +# python-pip is no longer included in the distribution as Python 2 is out of support |
| 28 | + curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | python |
| 29 | +# In-silico PCR tool for primer design |
| 30 | +RUN curl -Lo /usr/local/bin/dicey https://github.com/gear-genomics/dicey/releases/download/v0.1.8/dicey_v0.1.8_linux_x86_64bit && \ |
| 31 | + chmod +x /usr/local/bin/dicey |
| 32 | +# UCSC Genome Browser kent binaries |
| 33 | +RUN curl -Lo /usr/local/bin/faToTwoBit https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit \ |
| 34 | + -Lo /usr/local/bin/twoBitToFa https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/twoBitToFa && \ |
| 35 | + chmod +x /usr/local/bin/faToTwoBit /usr/local/bin/twoBitToFa |
| 36 | +RUN curl -LO https://github.com/GMOD/jbrowse/releases/download/1.12.5-release/JBrowse-1.12.5.zip && \ |
| 37 | + unzip JBrowse-1.12.5.zip && \ |
| 38 | + mv JBrowse-1.12.5 /var/www/html/jbrowse && \ |
| 39 | + rm JBrowse-1.12.5.zip && \ |
| 40 | + cd /var/www/html/jbrowse && ./setup.sh && \ |
| 41 | +# Default FORCAST configuration for JBrowse. jbrowse/data/datasets.conf is bind-mounted for editing. |
| 42 | + echo -e "classicMenu = true\ninclude += data/datasets.conf\n\n[aboutThisBrowser]\ntitle = FORCAST" >> /var/www/html/jbrowse/jbrowse.conf && \ |
| 43 | +# Add favicon |
| 44 | + sed -i '6i\ <link rel="icon" href="../docs/img/crispr-icon.png" sizes="100x100">' /var/www/html/jbrowse/index.html |
| 45 | +# Dependencies for FORCAST CGI scripts |
| 46 | +RUN pip install --no-cache-dir pymongo==3.12.3 requests==2.27.1 && \ |
| 47 | + pip3 install --no-cache-dir pymongo==3.12.3 requests==2.27.1 Jinja2==3.1.2 |
| 48 | +COPY config-template /var/www/html/config |
| 49 | +WORKDIR /var/www/html |
| 50 | +# Replace the /usr/sbin/apachectl script that is called with the Apache master process that respects signals |
| 51 | +ENV APACHE_HTTPD exec /usr/sbin/apache2 |
| 52 | +CMD service mongodb start && exec apache2-foreground |
0 commit comments