Skip to content

Commit

Permalink
Fix the Calibre plugins in the docker image
Browse files Browse the repository at this point in the history
Previously the Goodreads and WorldCat plugins were installed with for the root user while calibre ran as a normal user...
  • Loading branch information
na-- committed Jul 1, 2018
1 parent 2702bd1 commit d7f8021
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
FROM debian:sid-slim

WORKDIR /ebook-tools

ENTRYPOINT ["bash"]

RUN apt-get update && \
apt-get --no-install-recommends -y install file less bash coreutils gawk sed grep calibre p7zip-full tesseract-ocr tesseract-ocr-osd tesseract-ocr-eng python-lxml poppler-utils catdoc djvulibre-bin locales curl ca-certificates && \
rm -rf /var/lib/apt/lists/* && \
localedef -i en_US -c -f UTF-8 en_US.UTF-8 && \
curl 'https://www.mobileread.com/forums/attachment.php?attachmentid=163537' > goodreads.zip && \
useradd -mUs /usr/bin/bash -u 1000 user && \
mkdir /ebook-tools && \
chown user:user /ebook-tools

WORKDIR /ebook-tools

ENV LANG="en_US.UTF-8" PATH="${PATH}:/ebook-tools"

USER user

RUN curl 'https://www.mobileread.com/forums/attachment.php?attachmentid=163537' > goodreads.zip && \
sha256sum 'goodreads.zip' | grep -q 'c44f88222017aaad0aa1a674e69f46b309198269c7f13ebd671ae942052d45a8' && \
calibre-customize --add-plugin goodreads.zip && \
rm goodreads.zip && \
curl -L 'https://github.com/na--/calibre-worldcat-xisbn-metadata-plugin/archive/0.1.zip' > worldcat.zip && \
sha256sum worldcat.zip | grep -q 'bedddcd736382baf95fed2c38698ded15b0d8fbd8085bacd1a4b4766e972dd4d' && \
7z x worldcat.zip && \
calibre-customize --build-plugin calibre-worldcat-xisbn-metadata-plugin-0.1/ && \
rm -rf worldcat.zip calibre-worldcat-xisbn-metadata-plugin-0.1 && \
useradd -mUs /usr/bin/bash -u 1000 user

USER user

ENV LANG="en_US.UTF-8" PATH="${PATH}:/ebook-tools"
rm -rf worldcat.zip calibre-worldcat-xisbn-metadata-plugin-0.1

COPY . /ebook-tools

0 comments on commit d7f8021

Please sign in to comment.