fix phantomjs install in alpine

This commit is contained in:
Sam
2017-06-11 14:25:18 +02:00
parent 0ed2a1cf4c
commit b92c8d928e

View File

@@ -6,30 +6,20 @@ MAINTAINER Samuel Laulhau <sam@lalop.co>
# SYSTEM REQUIREMENT
#####
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
RUN apk update
RUN apk add libmcrypt-dev
# RUN apk add zlib1g-dev
RUN apk add git
RUN apk add gmp-dev
RUN apk add freetype-dev
RUN apk add libjpeg-turbo-dev
RUN apk add libpng-dev
RUN apk add coreutils
RUN apk add chrpath
# RUN apk add libssl-dev
# RUN apk add libxft-dev \
# libfreetype6 libfontconfig1 libfontconfig1-dev \
RUN apk update \
&& apk add --no-cache libmcrypt-dev git gmp-dev freetype-dev libjpeg-turbo-dev \
coreutils chrpath fontconfig libpng-dev
RUN ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gmp \
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip gd gmp opcache \
&& curl -o ${PHANTOMJS}.tar.bz2 -SL https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS}.tar.bz2 \
&& tar xvjf ${PHANTOMJS}.tar.bz2 \
&& rm ${PHANTOMJS}.tar.bz2 \
&& mv ${PHANTOMJS} /usr/local/share \
&& ln -sf /usr/local/share/${PHANTOMJS}/bin/phantomjs /usr/local/bin \
&& rm -rf /var/lib/apt/lists/* \
&& echo "php_admin_value[error_reporting] = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED">>/usr/local/etc/php-fpm.d/www.conf
RUN cd /usr/share \
&& curl -L https://github.com/Overbryd/docker-phantomjs-alpine/releases/download/2.11/phantomjs-alpine-x86_64.tar.bz2 | tar xj \
&& ln -s /usr/share/phantomjs/phantomjs /usr/bin/phantomjs
# set recommended PHP.ini settings
# see https://secure.php.net/manual/en/opcache.installation.php