FROM debian:jessie-slim MAINTAINER Joerg Holetschek # Add this folder so that installing default-jre won't fail RUN mkdir /usr/share/man/man1 RUN apt-get update RUN apt-get install -y apache2 python subversion python-pyodbc python-pymssql python-psycopg2 python-mysqldb python-sqlite # These modules are optional RUN apt-get install -y default-jre nano graphviz libxml2 python-libxml2 libxslt1.1 python-libxslt1 RUN apt-get clean && rm -rf /var/lib/apt/lists/* # Set Apache environment variables ENV APACHE_RUN_USER www-data ENV APACHE_RUN_GROUP www-data ENV APACHE_LOG_DIR /var/log/apache2 ENV APACHE_LOCK_DIR /var/lock/apache2 ENV APACHE_PID_FILE /var/run/apache2/apache2.pid ENV APACHE_RUN_DIR /var/run/apache2 # Enable cgi RUN /usr/sbin/a2enmod cgid # Checkout BioCASe, change owner RUN cd /opt/ && svn export http://ww2.biocase.org/svn/bps2/trunk biocase RUN chown -R www-data:www-data /opt/biocase # Set bpsPath in lib/biocase/addjustpath.py to r'/opt/biocase' RUN sed -i 's/C:\\Workspace\\bps2/\/opt\/biocase/g' /opt/biocase/lib/biocase/adjustpath.py # chdir to tools, then run fixpermissions.py RUN cd /opt/biocase/tools && python fixpermissions.py # Set up virtual host and expose HTTP port (add "EXPOSE 443" for HTTPS) RUN sed -i 's//ServerName localhost\n/g' /etc/apache2/sites-enabled/000-default.conf RUN sed -i 's/<\/VirtualHost>/\n\nAlias \/biocase "\/opt\/biocase\/www"\n\n\tAllowOverride None\n\tOrder allow,deny\n\tAllow from all\n\tOptions \+ExecCGI \+Indexes\n\tAddHandler cgi-script cgi\n\tDirectoryIndex index\.cgi index\.html\n\tRequire all granted\n<\/Directory>\n\n<\/VirtualHost>/g' /etc/apache2/sites-enabled/000-default.conf EXPOSE 80 # Start Apache CMD /usr/sbin/apache2ctl -D FOREGROUND