Skip to content

Instantly share code, notes, and snippets.

@donaldgray
Created February 11, 2020 10:53
Show Gist options
  • Save donaldgray/f3ba79fd4646aa38dcdcda6363f6d1f1 to your computer and use it in GitHub Desktop.
Save donaldgray/f3ba79fd4646aa38dcdcda6363f6d1f1 to your computer and use it in GitHub Desktop.
Dockerfile for building iipsrv with openjpeg
FROM ubuntu:18.04
# install required packages
RUN apt-get update && apt-get install -y \
libfcgi0ldbl libjpeg8 zlib1g-dev libstdc++6 libtool cmake wget \
libjpeg-dev libtiff-dev libpng-dev liblcms2-2 libmemcached-dev \
lighttpd memcached git autoconf
# clone openjpeg
RUN mkdir -p /opt && cd /opt && git clone https://github.com/uclouvain/openjpeg.git
# install build-essentials
RUN apt-get install build-essential
# build openjpeg
RUN cd /opt/openjpeg && cmake -DCMAKE_BUILD_TYPE=Release _DCMAKE_INSTALL_PREFIX=/usr . && make && make install && ldconfig
# copy openjpeg headers
RUN cp /usr/local/include/openjpeg-2.3/*.h /opt/openjpeg/src/lib/openjp2/
RUN cp /usr/local/lib/libopenjp2.so /opt/openjpeg/bin/.
# clone iipsrv
RUN cd ~ && git clone https://github.com/ruven/iipsrv.git
# build iipsrv
RUN cd ~/iipsrv && ./autogen.sh && ./configure --with-openjpeg=/opt/openjpeg && make
# copy required files to run
RUN mkdir -p /opt/iipsrv && cp ~/iipsrv/src/iipsrv.fcgi /opt/iipsrv/.
WORKDIR /export
RUN echo Copying /opt/openjpeg to /export/openjpeg ...
RUN mkdir -p /export/openjpeg && cp -R /opt/openjpeg .
RUN echo Copying /opt/iipsrv to /export/iipsrv ...
RUN mkdir -p /export/iipsrv && cp -R /opt/iipsrv .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment