2019-03-23 22:26:53 -07:00
|
|
|
|
FROM lsiobase/python:arm32v7-3.9
|
2019-02-12 23:22:48 -08:00
|
|
|
|
|
|
|
|
|
# set version label
|
|
|
|
|
ARG BUILD_DATE
|
|
|
|
|
ARG VERSION
|
|
|
|
|
ARG CALIBRE_COMMIT
|
|
|
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
|
|
|
LABEL maintainer="chbmb"
|
|
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
|
echo "**** install build packages ****" && \
|
|
|
|
|
apk add --no-cache --virtual=build-dependencies \
|
|
|
|
|
file \
|
|
|
|
|
fontconfig-dev \
|
|
|
|
|
freetype-dev \
|
|
|
|
|
g++ \
|
|
|
|
|
gcc \
|
|
|
|
|
ghostscript-dev \
|
|
|
|
|
lcms2-dev \
|
|
|
|
|
libjpeg-turbo-dev \
|
|
|
|
|
libpng-dev \
|
|
|
|
|
libtool \
|
|
|
|
|
libwebp-dev \
|
|
|
|
|
libxml2-dev \
|
|
|
|
|
libxslt-dev \
|
|
|
|
|
make \
|
|
|
|
|
perl-dev \
|
|
|
|
|
python2-dev \
|
|
|
|
|
tiff-dev \
|
|
|
|
|
xz \
|
|
|
|
|
zlib-dev && \
|
|
|
|
|
echo "**** install runtime packages ****" && \
|
|
|
|
|
apk add --no-cache \
|
|
|
|
|
fontconfig \
|
|
|
|
|
freetype \
|
|
|
|
|
ghostscript \
|
2019-02-24 12:20:36 -08:00
|
|
|
|
imagemagick6 \
|
2019-02-12 23:22:48 -08:00
|
|
|
|
jq \
|
|
|
|
|
lcms2 \
|
|
|
|
|
libjpeg-turbo \
|
|
|
|
|
libltdl \
|
|
|
|
|
libpng \
|
|
|
|
|
libwebp \
|
|
|
|
|
libxml2 \
|
|
|
|
|
libxslt \
|
|
|
|
|
tiff \
|
|
|
|
|
zlib && \
|
|
|
|
|
echo "**** install calibre-web ****" && \
|
|
|
|
|
if [ -z ${CALIBRE_COMMIT+x} ]; then \
|
|
|
|
|
CALIBRE_COMMIT=$(curl -sX GET https://api.github.com/repos/janeczku/calibre-web/commits/master \
|
|
|
|
|
| jq -r '. | .sha'); \
|
|
|
|
|
fi && \
|
|
|
|
|
mkdir -p \
|
|
|
|
|
/app/calibre-web && \
|
|
|
|
|
curl -o \
|
|
|
|
|
/tmp/calibre-web.tar.gz -L \
|
|
|
|
|
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
|
|
|
|
|
tar xf \
|
|
|
|
|
/tmp/calibre-web.tar.gz -C \
|
|
|
|
|
/app/calibre-web --strip-components=1 && \
|
|
|
|
|
cd /app/calibre-web && \
|
|
|
|
|
pip install --no-cache-dir -U -r \
|
|
|
|
|
requirements.txt && \
|
|
|
|
|
pip install --no-cache-dir -U -r \
|
|
|
|
|
optional-requirements.txt && \
|
|
|
|
|
echo "**** cleanup ****" && \
|
|
|
|
|
apk del --purge \
|
|
|
|
|
build-dependencies && \
|
|
|
|
|
rm -rf \
|
|
|
|
|
/tmp/*
|
|
|
|
|
|
|
|
|
|
# add local files
|
|
|
|
|
COPY root/ /
|
|
|
|
|
|
|
|
|
|
# ports and volumes
|
|
|
|
|
EXPOSE 8083
|
|
|
|
|
VOLUME /books /config
|