mirror of
https://github.com/linuxserver/docker-calibre.git
synced 2026-01-09 07:01:30 +08:00
77 lines
2.2 KiB
Docker
77 lines
2.2 KiB
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM ghcr.io/linuxserver/baseimage-selkies:ubuntunoble
|
|
|
|
# set version label
|
|
ARG BUILD_DATE
|
|
ARG VERSION
|
|
ARG CALIBRE_RELEASE
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
LABEL maintainer="aptalca"
|
|
|
|
ENV \
|
|
CUSTOM_PORT="8080" \
|
|
CUSTOM_HTTPS_PORT="8181" \
|
|
HOME="/config" \
|
|
TITLE="Calibre" \
|
|
QTWEBENGINE_DISABLE_SANDBOX="1"
|
|
|
|
RUN \
|
|
echo "**** add icon ****" && \
|
|
curl -o \
|
|
/usr/share/selkies/www/icon.png \
|
|
https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/calibre-icon.png && \
|
|
echo "**** install runtime packages ****" && \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
dbus \
|
|
fcitx-rime \
|
|
fonts-wqy-microhei \
|
|
libnss3 \
|
|
libopengl0 \
|
|
libqpdf29t64 \
|
|
libxkbcommon-x11-0 \
|
|
libxcb-cursor0 \
|
|
libxcb-icccm4 \
|
|
libxcb-image0 \
|
|
libxcb-keysyms1 \
|
|
libxcb-randr0 \
|
|
libxcb-render-util0 \
|
|
libxcb-xinerama0 \
|
|
poppler-utils \
|
|
python3 \
|
|
python3-xdg \
|
|
ttf-wqy-zenhei \
|
|
wget \
|
|
xz-utils && \
|
|
apt-get install -y \
|
|
speech-dispatcher && \
|
|
echo "**** install calibre ****" && \
|
|
mkdir -p \
|
|
/opt/calibre && \
|
|
if [ -z ${CALIBRE_RELEASE+x} ]; then \
|
|
CALIBRE_RELEASE=$(curl -sX GET "https://api.github.com/repos/kovidgoyal/calibre/releases/latest" \
|
|
| jq -r .tag_name); \
|
|
fi && \
|
|
CALIBRE_VERSION="$(echo ${CALIBRE_RELEASE} | cut -c2-)" && \
|
|
CALIBRE_URL="https://download.calibre-ebook.com/${CALIBRE_VERSION}/calibre-${CALIBRE_VERSION}-x86_64.txz" && \
|
|
if ! curl -fo /tmp/calibre-tarball.txz -L "https://github.com/kovidgoyal/calibre/releases/download/v${CALIBRE_VERSION}/calibre-${CALIBRE_VERSION}-x86_64.txz"; then \
|
|
curl -fo \
|
|
/tmp/calibre-tarball.txz -L \
|
|
"$CALIBRE_URL"; \
|
|
fi && \
|
|
tar xvf /tmp/calibre-tarball.txz -C \
|
|
/opt/calibre && \
|
|
/opt/calibre/calibre_postinstall && \
|
|
dbus-uuidgen > /etc/machine-id && \
|
|
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
|
echo "**** cleanup ****" && \
|
|
apt-get clean && \
|
|
rm -rf \
|
|
/tmp/* \
|
|
/var/lib/apt/lists/* \
|
|
/var/tmp/*
|
|
|
|
# add local files
|
|
COPY root/ /
|