Dockerfile 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. FROM --platform=linux/amd64 ubuntu:latest
  2. RUN apt-get update && apt-get install -y curl xz-utils
  3. ARG CALIBRE_RELEASE="7.1.0"
  4. RUN curl -o /tmp/calibre-tarball.txz -L "https://download.calibre-ebook.com/${CALIBRE_RELEASE}/calibre-${CALIBRE_RELEASE}-x86_64.txz" && \
  5. mkdir -p /opt/calibre && \
  6. tar xvf /tmp/calibre-tarball.txz -C /opt/calibre && \
  7. rm -rf /tmp/*
  8. FROM --platform=linux/amd64 debian:bookworm-slim
  9. RUN apt-get update && apt-get install -y \
  10. dnsutils \
  11. iproute2 \
  12. libfontconfig \
  13. libgl1 \
  14. libegl1 \
  15. libxkbcommon-x11-0 \
  16. libopengl0 \
  17. libnss3-dev \
  18. libxcomposite-dev \
  19. libxdamage1 \
  20. libxrandr2 \
  21. libxtst6 \
  22. libxkbfile-dev \
  23. xdg-utils \
  24. && rm -rf /var/lib/apt/lists/*
  25. COPY --from=0 /opt/calibre /opt/calibre
  26. RUN mkdir /usr/share/desktop-directories/
  27. RUN /opt/calibre/calibre_postinstall && \
  28. mkdir /opt/calibre/calibre-library && \
  29. touch /opt/calibre/calibre-library/metadata.db
  30. COPY server-users.sqlite /opt/calibre/calibre-library/server-users.sqlite
  31. COPY start-calibre-server.sh .
  32. EXPOSE 8080
  33. CMD [ "/start-calibre-server.sh" ]