Skip to content

Commit

Permalink
Merge pull request #3 from camicroscope/release
Browse files Browse the repository at this point in the history
For 3.1.0
  • Loading branch information
birm authored Mar 11, 2019
2 parents c20086e + fa4eb1a commit 9709e37
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FROM ubuntu:14.04
RUN mkdir /root/src
COPY . /root/src

WORKDIR /images
VOLUME ["/images"]

WORKDIR /root/src

### update
RUN apt-get -q update
Expand All @@ -14,39 +7,27 @@ RUN apt-get -q -y dist-upgrade
RUN apt-get clean
RUN apt-get -q update

# OpenSSH server
RUN apt-get -q -y install openssh-server

### need build tools for building openslide and later iipsrv
RUN apt-get -q -y install git autoconf automake make libtool pkg-config cmake

### install apache and dependencies. using fcgid
RUN apt-get -q -y install apache2 libapache2-mod-fcgid libfcgi0ldbl
RUN apt-get -q -y install openssh-server git autoconf automake make libtool pkg-config cmake apache2 libapache2-mod-fcgid libfcgi0ldbl
RUN apt-get -q -y install zlib1g-dev libpng12-dev libjpeg-dev libtiff5-dev libgdk-pixbuf2.0-dev libxml2-dev libsqlite3-dev libcairo2-dev libglib2.0-dev
RUN apt-get -q -y install g++ libmemcached-dev libjpeg-turbo8-dev
RUN a2enmod rewrite
RUN a2enmod fcgid

### install php
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 apache2-utils libapache2-mod-php5 php5-mysql php5-gd php-pear php-apc php5-curl curl lynx-cur


# Enable apache mods.
RUN a2enmod php5
RUN a2enmod rewrite

WORKDIR /images
VOLUME ["/images"]

# Update the PHP.ini file, enable <? ?> tags and quieten logging.
RUN sed -i "s/short_open_tag = Off/short_open_tag = On/" /etc/php5/apache2/php.ini
RUN sed -i "s/error_reporting = .*$/error_reporting = E_ERROR | E_WARNING | E_PARSE/" /etc/php5/apache2/php.ini
RUN sed -i "s/; max_input_vars = 1000/max_input_vars = 100000/" /etc/php5/apache2/php.ini
RUN mkdir /root/src
COPY . /root/src
WORKDIR /root/src


## get our configuration files
WORKDIR /root/src
RUN git clone https://[email protected]/tcpan/iip-openslide-docker.git
#RUN git clone https://[email protected]/tcpan/iip-openslide-docker.git

## replace apache's default fcgi config with ours.
RUN rm /etc/apache2/mods-enabled/fcgid.conf
RUN ln -s /root/src/iip-openslide-docker/apache2-iipsrv-fcgid.conf /etc/apache2/mods-enabled/fcgid.conf
COPY ./fcgid.conf /etc/apache2/mods-enabled/fcgid.conf

## enable proxy
RUN ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load
Expand All @@ -60,30 +41,25 @@ COPY ports.conf /etc/apache2/ports.conf
## setup a mount point for images. - this is external to the docker container.
RUN mkdir -p /mnt/images

### prereqs for openslide
RUN apt-get clean
RUN apt-get -q update
RUN apt-get -q -y install zlib1g-dev libpng12-dev libjpeg-dev libtiff5-dev libgdk-pixbuf2.0-dev libxml2-dev libsqlite3-dev libcairo2-dev libglib2.0-dev

WORKDIR /root/src

### openjpeg version in ubuntu 14.04 is 1.3, too old and does not have openslide required chroma subsampled images support. download 2.1.0 from source and build
RUN wget https://sourceforge.net/projects/openjpeg.mirror/files/2.1.0/openjpeg-2.1.0.tar.gz
RUN tar xvfz openjpeg-2.1.0.tar.gz
RUN mkdir /root/src/openjpeg-bin
WORKDIR /root/src/openjpeg-bin
RUN cmake -DBUILD_JPIP=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_PKGCONFIG_FILES=ON /root/src/openjpeg-2.1.0
RUN git clone https://github.com/uclouvain/openjpeg.git --branch=v2.3.0
RUN mkdir /root/src/openjpeg/build
WORKDIR /root/src/openjpeg/build
RUN cmake -DBUILD_JPIP=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_CODEC=ON -DBUILD_PKGCONFIG_FILES=ON ../
RUN make
RUN make install

### Openslide
WORKDIR /root/src
## get my fork from openslide source cdoe
RUN git clone https://bitbucket.org/tcpan/openslide.git
RUN git clone https://github.com/openslide/openslide.git

## build openslide
WORKDIR /root/src/openslide
RUN git checkout tags/v0.3.1
RUN git checkout tags/v3.4.1
RUN autoreconf -i
#RUN ./configure --enable-static --enable-shared=no
# may need to set OPENJPEG_CFLAGS='-I/usr/local/include' and OPENJPEG_LIBS='-L/usr/local/lib -lopenjp2'
Expand All @@ -94,8 +70,6 @@ RUN make install

### iipsrv
WORKDIR /root/src
RUN apt-get -q -y install g++ libmemcached-dev libjpeg-turbo8-dev
## fork from Ruven's iipsrv repo
RUN git clone https://bitbucket.org/tcpan/iipsrv.git iipsrv

## build iipsrv
Expand All @@ -110,7 +84,7 @@ RUN make
RUN mkdir -p /var/www/localhost/fcgi-bin/
RUN cp /root/src/iipsrv/src/iipsrv.fcgi /var/www/localhost/fcgi-bin/

COPY apache2-iipsrv-fcgid.conf /root/src/iip-openslide-docker/apache2-iipsrv-fcgid.conf
#COPY apache2-iipsrv-fcgid.conf /root/src/iip-openslide-docker/apache2-iipsrv-fcgid.conf


CMD service apache2 start && while true; do sleep 1000; done

0 comments on commit 9709e37

Please sign in to comment.