# Install PrinceXML FROM php:7.2-apache # Add Libraries RUN echo '\ndeb http://ftp.au.debian.org/debian jessie main contrib' >> /etc/apt/sources.list # Install Composer RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer # Updates RUN apt-get update -qq && \ apt-get -f install && \ apt-get install -qq -y sudo \ gdebi \ aptitude \ cabextract \ libgif-dev \ fontconfig \ git \ zip \ unzip # PrinceXML - Latest x64 .deb from http://www.princexml.com/download/ RUN curl -O https://www.princexml.com/download/prince_12.2-1_debian9.1_amd64.deb RUN echo 'y' | sudo gdebi prince_12.2-1_debian9.1_amd64.deb RUN rm prince_12.2-1_debian9.1_amd64.deb # Install Core Fonts RUN echo 'y' | apt-get -q -y install ttf-mscorefonts-installer # Install Asian Fonts RUN apt-get -q -y install ttf-kochi-mincho \ ttf-kochi-gothic \ fonts-nanum \ fonts-nanum-extra \ ttf-baekmuk # Install Local Fonts COPY ./fonts/helvetica/* /usr/share/fonts/truetype/helvetica/ COPY ./fonts/msttcorefonts/* /usr/share/fonts/truetype/msttcorefonts/ COPY ./fonts/ptmono/* /usr/share/fonts/truetype/ptmono/ COPY ./fonts/ptsans/* /usr/share/fonts/truetype/ptsans/ COPY ./fonts/sourcesanspro/* /usr/share/fonts/truetype/sourcesanspro/ COPY ./fonts/unifont/* /usr/share/fonts/truetype/unifont/ COPY ./fonts/khmer/* /usr/share/fonts/truetype/khmer/ ## Load Fonts RUN fc-list # Install License COPY ./license/license.dat /usr/lib/prince/license/ # php.ini COPY php.ini /usr/local/etc/php/ # Configure DocumentRoot RUN mkdir /var/www/html/public RUN sed -i 's/DocumentRoot\ \/var\/www\/html/DocumentRoot\ \/var\/www\/html\/public/g' /etc/apache2/sites-enabled/000-default.conf # Add Prince log directory RUN mkdir -p /var/log/prince # Mod Rewrite RUN a2enmod rewrite \ && service apache2 restart