docker-calibre-web/Dockerfile

78 lines
1.5 KiB
Docker
Raw Normal View History

FROM lsiobase/python:3.9
2017-03-20 18:34:52 -07:00
# set version label
ARG BUILD_DATE
ARG VERSION
2019-02-12 23:22:48 -08:00
ARG CALIBRE_COMMIT
2017-03-20 18:34:52 -07:00
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="chbmb"
2017-03-20 18:34:52 -07:00
RUN \
echo "**** install build packages ****" && \
2017-03-20 18:34:52 -07:00
apk add --no-cache --virtual=build-dependencies \
2017-07-17 11:52:33 -07:00
file \
fontconfig-dev \
freetype-dev \
2017-03-20 18:34:52 -07:00
g++ \
gcc \
2017-07-17 11:52:33 -07:00
ghostscript-dev \
lcms2-dev \
libjpeg-turbo-dev \
libpng-dev \
libtool \
libwebp-dev \
libxml2-dev \
libxslt-dev \
2017-03-20 18:34:52 -07:00
make \
2017-07-17 11:52:33 -07:00
perl-dev \
python2-dev \
tiff-dev \
xz \
zlib-dev && \
echo "**** install runtime packages ****" && \
2017-03-20 18:34:52 -07:00
apk add --no-cache \
2017-07-17 11:52:33 -07:00
fontconfig \
freetype \
ghostscript \
imagemagick6 \
2019-02-12 23:22:48 -08:00
jq \
2017-07-17 11:52:33 -07:00
lcms2 \
libjpeg-turbo \
libltdl \
libpng \
libwebp \
libxml2 \
libxslt \
2017-07-17 11:52:33 -07:00
tiff \
zlib && \
echo "**** install calibre-web ****" && \
2019-02-12 23:22:48 -08:00
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 && \
2017-03-20 18:34:52 -07:00
mkdir -p \
/app/calibre-web && \
curl -o \
/tmp/calibre-web.tar.gz -L \
2019-02-12 23:22:48 -08:00
https://github.com/janeczku/calibre-web/archive/${CALIBRE_COMMIT}.tar.gz && \
2017-03-20 18:34:52 -07:00
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 && \
2017-06-06 23:33:43 -07:00
pip install --no-cache-dir -U -r \
optional-requirements.txt && \
echo "**** cleanup ****" && \
2017-03-20 18:34:52 -07:00
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# add local files
COPY root/ /
# ports and volumes
2017-06-06 23:33:43 -07:00
EXPOSE 8083
2017-03-20 18:34:52 -07:00
VOLUME /books /config