docker-lychee/Dockerfile
sparklyballs 234ed49d17 blah
2017-01-28 11:02:31 +00:00

80 lines
1.7 KiB
Docker
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM lsiobase/alpine.nginx:3.5
MAINTAINER chbmb
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# package version
ARG PHP_IMAGICK_VER="3.4.2"
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
autoconf \
curl \
file \
g++ \
gcc \
imagemagick-dev \
libtool \
make \
php7-dev && \
# install runtime packages
apk add --no-cache \
imagemagick \
mc \
php7-curl \
php7-exif \
php7-gd \
php7-mbstring \
php7-mysqlnd \
php7-session \
php7-zip && \
# install lychee
mkdir -p \
/usr/share/webapps/lychee && \
lychee_tag=$(curl -sX GET "https://api.github.com/repos/electerious/Lychee/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
curl -o \
/tmp/lychee.tar.gz -L \
"https://github.com/electerious/Lychee/archive/${lychee_tag}.tar.gz" && \
tar xf \
/tmp/lychee.tar.gz -C \
/usr/share/webapps/lychee --strip-components=1 && \
if [ -e /usr/share/webapps/lychee/.user.ini ]; then rm /usr/share/webapps/lychee/.user.ini; fi && \
# install php imagemagick
mkdir -p \
/tmp/imagick-src && \
curl -o \
/tmp/imagick.tgz -L \
"http://pecl.php.net/get/imagick-${PHP_IMAGICK_VER}.tgz" && \
tar xf \
/tmp/imagick.tgz -C \
/tmp/imagick-src --strip-components=1 && \
cd /tmp/imagick-src && \
phpize7 && \
./configure \
--prefix=/usr \
--with-php-config=/usr/bin/php-config7 && \
make && \
make install && \
echo "extension=imagick.so" > /etc/php7/conf.d/00_imagick.ini && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# add local files
COPY root/ /
# ports and volumes
EXPOSE 80
VOLUME /config