Dockerfile 1.46 KB
Newer Older
Sebastien's avatar
Sebastien committed
1 2 3
FROM ubuntu:16.04
MAINTAINER Sebastien.Carrere@toulouse.inra.fr

Sebastien's avatar
Sebastien committed
4
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils
Sebastien's avatar
Sebastien committed
5 6
RUN apt-get -q update && \
        DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
Sebastien's avatar
Sebastien committed
7
        hardinfo wget patch vim gawk unzip apache2 zlib1g-dev libpng-dev libgd2-noxpm-dev build-essential && \
Sebastien's avatar
Sebastien committed
8 9
        apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

10
RUN apt-get -q update && apt-get install -yq cron at libtree-simple-perl libbio-perl-perl ncbi-blast+ sqlite liberror-perl libswitch-perl libxml-simple-perl libjson-perl libapache-session-perl libnet-ldap-perl libapache-htpasswd-perl ssmtp fasttree mafft biosquid python2.7 python-scipy python-sklearn python-numpy python-fastcluster mcl libarray-utils-perl liburi-encode-perl cd-hit
Sebastien's avatar
Sebastien committed
11 12 13

WORKDIR /var/www/

14
ENV ROOTDIR=/var/www/family-companion
Sebastien's avatar
Sebastien committed
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

COPY . $ROOTDIR

WORKDIR $ROOTDIR

#Install 

RUN chown -R www-data.www-data $ROOTDIR

RUN a2enmod rewrite
RUN a2enmod cgi
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf


RUN cp $ROOTDIR/site/cfg/site-docker.cfg $ROOTDIR/site/cfg/site.cfg
RUN cp $ROOTDIR/site/cfg/authentication-docker.cfg $ROOTDIR/site/cfg/authentication.cfg

RUN export USER=root && ./bin/int/admin_install.pl --docker

RUN cp $ROOTDIR/site/cfg/apache-docker.conf /etc/apache2/sites-available/000-default.conf

WORKDIR	$ROOTDIR/site


CMD ["sh","-c","service apache2 start && /bin/bash &&  export USER=root"]