Changes to be committed:
new file: .gitignore modified: Dockerfile modified: README.md modified: patches/calibre-web/optional-requirements.patch
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
patches/calibre-web/optional-requirements.txt
|
||||||
|
patches/calibre-web/optional-requirements.txt.sav
|
||||||
|
build.log
|
||||||
117
Dockerfile
117
Dockerfile
@@ -1,4 +1,4 @@
|
|||||||
FROM debian:trixie-slim AS build
|
FROM ubuntu:noble AS build
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@@ -7,54 +7,69 @@ ARG CALIBREWEB_RELEASE
|
|||||||
ARG CALIBRE_INSTALLER_SOURCE_CODE_URL=https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py
|
ARG CALIBRE_INSTALLER_SOURCE_CODE_URL=https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py
|
||||||
ARG NETIFACES_PLUS_RELEASE
|
ARG NETIFACES_PLUS_RELEASE
|
||||||
ARG KEPUBIFY_RELEASE
|
ARG KEPUBIFY_RELEASE
|
||||||
|
# Configurer debconf pour utiliser un frontend non interactif
|
||||||
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
|
ARG DEBCONF_NONINTERACTIVE_SEEN=true
|
||||||
|
|
||||||
|
|
||||||
LABEL build_version="petite-maison-orange.fr version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
LABEL build_version="petite-maison-orange.fr version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
LABEL maintainer="Eric Coissac <eric@petite-maison-orange.fr>"
|
LABEL maintainer="Eric Coissac <eric@petite-maison-orange.fr>"
|
||||||
|
|
||||||
RUN cp /etc/apt/sources.list.d/debian.sources \
|
# RUN cp /etc/apt/sources.list.d/debian.sources \
|
||||||
/etc/apt/sources.list.d/debian.sources.save \
|
# /etc/apt/sources.list.d/debian.sources.save \
|
||||||
&& sed -e "s/contrib main/contrib main non-free-firmware/g" \
|
# && sed -e "s/contrib main/contrib main non-free-firmware/g" \
|
||||||
/etc/apt/sources.list.d/debian.sources.save > /etc/apt/sources.list.d/debian.sources
|
# /etc/apt/sources.list.d/debian.sources.save > /etc/apt/sources.list.d/debian.sources
|
||||||
|
|
||||||
RUN \
|
RUN \
|
||||||
echo "**** install build packages ****" 1>&2 \
|
echo "**** Installing required packages ****" 1>&2 \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y libxcb-xkb-dev \
|
&& apt-get install -y --no-install-recommends \
|
||||||
&& apt-get install -y build-essential \
|
build-essential \
|
||||||
&& apt-get install -y tzdata \
|
ca-certificates \
|
||||||
&& apt-get install -y libzmq3-dev \
|
curl \
|
||||||
&& apt-get install -y libldap-dev \
|
file \
|
||||||
&& apt-get install -y libsasl2-dev \
|
git \
|
||||||
&& apt-get install -y libxml2-dev \
|
golang-go \
|
||||||
&& apt-get install -y libxslt1-dev \
|
google-mock \
|
||||||
&& apt-get install -y imagemagick \
|
imagemagick \
|
||||||
&& apt-get install -y git \
|
jq \
|
||||||
&& apt-get install -y jq \
|
libegl1 \
|
||||||
&& apt-get install -y curl \
|
libgl1-mesa-glx \
|
||||||
&& apt-get install -y wget \
|
libglx-mesa0 \
|
||||||
&& apt-get install -y xz-utils \
|
libldap2-dev \
|
||||||
&& apt-get install -y bash \
|
libsasl2-dev \
|
||||||
&& apt-get install -y python3-pip \
|
libxcb-shm0 \
|
||||||
&& apt-get install -y python3-venv \
|
libxcb-shape0 \
|
||||||
&& apt-get install -y python3-dev \
|
libxcb-xkb-dev \
|
||||||
&& apt-get install -y python3-setuptools \
|
libx11-xcb1 \
|
||||||
&& apt-get install -y golang-go \
|
libxkbcommon-x11-0 \
|
||||||
&& apt-get install -y google-mock \
|
libxml2-dev \
|
||||||
&& apt-get install -y file
|
libxslt1-dev \
|
||||||
|
libzmq3-dev \
|
||||||
|
python3-dev \
|
||||||
|
python3-pip \
|
||||||
|
python3-setuptools \
|
||||||
|
python3-venv \
|
||||||
|
tzdata \
|
||||||
|
unrar \
|
||||||
|
wget \
|
||||||
|
xz-utils \
|
||||||
|
bash
|
||||||
RUN echo "**** create tmp dir ****" 1>&2 \
|
RUN echo "**** create tmp dir ****" 1>&2 \
|
||||||
&& mkdir -p /tmp
|
&& mkdir -p /tmp
|
||||||
|
|
||||||
RUN \
|
# Télécharger et installer Go
|
||||||
echo "**** install Unrar from source" 1>&2 \
|
# Définir la version de Go à installer
|
||||||
&& cd /tmp \
|
ENV GO_VERSION=1.24.1
|
||||||
&& curl https://www.rarlab.com/rar/unrarsrc-7.0.9.tar.gz \
|
ENV GO_TARBALL=go${GO_VERSION}.linux-amd64.tar.gz
|
||||||
| tar zxvf - \
|
|
||||||
&& cd unrar \
|
RUN echo "***Download and install ${GO_TARBALL}"
|
||||||
&& sed 's/^DEFINES=/DEFINES=-DUSE_FALLOCATE /' \
|
RUN curl -OL https://go.dev/dl/${GO_TARBALL} && \
|
||||||
makefile > Makefile \
|
tar -C /usr/local -xzf ${GO_TARBALL} && \
|
||||||
&& make -f Makefile \
|
rm ${GO_TARBALL}
|
||||||
&& make -f Makefile install
|
|
||||||
|
# Définir le PATH pour Go
|
||||||
|
ENV PATH="/usr/local/go/bin:${PATH}"
|
||||||
|
|
||||||
RUN echo "***install kepubify from source" 1>&2 \
|
RUN echo "***install kepubify from source" 1>&2 \
|
||||||
&& go install github.com/pgaskin/kepubify@latest
|
&& go install github.com/pgaskin/kepubify@latest
|
||||||
@@ -73,7 +88,6 @@ RUN python3 -m venv /app \
|
|||||||
&& pip3 install --no-cache --upgrade tzdata \
|
&& pip3 install --no-cache --upgrade tzdata \
|
||||||
&& pip3 install --no-cache --upgrade netifaces-plus
|
&& pip3 install --no-cache --upgrade netifaces-plus
|
||||||
|
|
||||||
COPY patches /tmp/patches
|
|
||||||
|
|
||||||
|
|
||||||
RUN echo "**** install calibre ****" 1>&2 \
|
RUN echo "**** install calibre ****" 1>&2 \
|
||||||
@@ -82,9 +96,10 @@ ENV LD_LIBRARY_PATH=/usr/lib:/opt/calibre/lib
|
|||||||
ENV PATH=$PATH:/opt/calibre/bin
|
ENV PATH=$PATH:/opt/calibre/bin
|
||||||
ENV LC_ALL=C
|
ENV LC_ALL=C
|
||||||
ENV CALIBRE_INSTALLER=https://download.calibre-ebook.com/linux-installer.sh
|
ENV CALIBRE_INSTALLER=https://download.calibre-ebook.com/linux-installer.sh
|
||||||
RUN apt-get install -y libopengl0 \
|
RUN apt-get install -y --no-install-recommends \
|
||||||
&& apt-get install -y libegl1 \
|
libopengl0 \
|
||||||
&& apt-get install -y libxcb-cursor0 \
|
libegl1 \
|
||||||
|
libxcb-cursor0 \
|
||||||
&& curl -L ${CALIBRE_INSTALLER} \
|
&& curl -L ${CALIBRE_INSTALLER} \
|
||||||
| sh /dev/stdin
|
| sh /dev/stdin
|
||||||
|
|
||||||
@@ -98,17 +113,22 @@ RUN echo "**** download calibre-web ****" 1>&2 \
|
|||||||
&& echo " ---> install version ${CALIBREWEB_RELEASE}" 1>&2 \
|
&& echo " ---> install version ${CALIBREWEB_RELEASE}" 1>&2 \
|
||||||
&& git clone --depth 1 --branch ${CALIBREWEB_RELEASE} https://github.com/janeczku/calibre-web.git /app/calibreweb
|
&& git clone --depth 1 --branch ${CALIBREWEB_RELEASE} https://github.com/janeczku/calibre-web.git /app/calibreweb
|
||||||
|
|
||||||
|
COPY patches /tmp/patches
|
||||||
RUN echo "**** apply calibre-web patches ****" 1>&2 \
|
RUN echo "**** apply calibre-web patches ****" 1>&2 \
|
||||||
&& cd /app/calibreweb \
|
&& cd /app/calibreweb \
|
||||||
&& for p in /tmp/patches/calibre-web/*.patch ; do \
|
&& for p in /tmp/patches/calibre-web/*.patch ; do \
|
||||||
patch -p0 < ${p} \
|
echo Applying patch : $p ; \
|
||||||
|| cat optional-requirements.txt ; \
|
patch --verbose -p0 < ${p} || \
|
||||||
|
cat optional-requirements.txt.rej; \
|
||||||
done
|
done
|
||||||
|
|
||||||
RUN echo "**** build & install calibre-web ****" 1>&2 \
|
RUN echo "**** build & install calibre-web ****" 1>&2 \
|
||||||
&& . /app/bin/activate \
|
&& . /app/bin/activate \
|
||||||
&& cd /app/calibreweb \
|
&& cd /app/calibreweb \
|
||||||
&& pip3 install --no-cache simpleldap \
|
&& pip3 install --no-cache simpleldap \
|
||||||
|
&& cat optional-requirements.txt \
|
||||||
|
&& pip3 install --only-binary :all: greenlet \
|
||||||
|
&& pip3 install --only-binary :all: Flask-SQLAlchemy \
|
||||||
&& pip3 install --no-cache \
|
&& pip3 install --no-cache \
|
||||||
-r requirements.txt \
|
-r requirements.txt \
|
||||||
-r optional-requirements.txt
|
-r optional-requirements.txt
|
||||||
@@ -130,7 +150,7 @@ RUN yes | /app/bin/pip3 uninstall rsa
|
|||||||
ENV TZ=Europe/Paris
|
ENV TZ=Europe/Paris
|
||||||
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime
|
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime
|
||||||
|
|
||||||
FROM debian:trixie-slim AS production
|
FROM ubuntu:noble AS production
|
||||||
|
|
||||||
|
|
||||||
# ports and volumes
|
# ports and volumes
|
||||||
@@ -154,6 +174,11 @@ RUN apt-get install --no-install-recommends -y tzdata \
|
|||||||
libnss3 \
|
libnss3 \
|
||||||
libxslt1.1 \
|
libxslt1.1 \
|
||||||
libxml2 \
|
libxml2 \
|
||||||
|
libxkbcommon-x11-0 \
|
||||||
|
libx11-xcb1 \
|
||||||
|
libegl1 \
|
||||||
|
libxcb-shm0 \
|
||||||
|
libxcb-shape0 \
|
||||||
imagemagick \
|
imagemagick \
|
||||||
bash \
|
bash \
|
||||||
procps \
|
procps \
|
||||||
|
|||||||
@@ -7,4 +7,10 @@ Build the image on macOS with orbstack docker:
|
|||||||
docker build . --platform linux/amd64 --debug
|
docker build . --platform linux/amd64 --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
docker build . --no-cache --load --platform linux/amd64 2>&1 | tee build.log
|
docker build . --no-cache --load --platform linux/amd64 2>&1 | tee build.log
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
diff -Naur <original_file> <new_file> > <patch_filename>.patch
|
||||||
|
```
|
||||||
@@ -1,67 +1,44 @@
|
|||||||
--- optional-requirements.txt.sav 2025-03-08 10:20:58
|
*** optional-requirements.txt Sat Mar 8 10:20:58 2025
|
||||||
+++ optional-requirements.txt 2025-03-08 10:21:06
|
--- optional-requirements.txt Sat Mar 8 11:00:43 2025
|
||||||
@@ -1,5 +1,55 @@
|
***************
|
||||||
|
*** 1,15 ****
|
||||||
# GDrive Integration
|
# GDrive Integration
|
||||||
+# google-api-python-client>=1.7.11,<2.200.0
|
! google-api-python-client>=1.7.11,<2.200.0
|
||||||
+# gevent>20.6.0,<24.3.0
|
! gevent>20.6.0,<24.3.0
|
||||||
+# greenlet>=0.4.17,<3.2.0
|
! greenlet>=0.4.17,<3.2.0
|
||||||
+# httplib2>=0.9.2,<0.23.0
|
! httplib2>=0.9.2,<0.23.0
|
||||||
+# oauth2client>=4.0.0,<4.1.4
|
! oauth2client>=4.0.0,<4.1.4
|
||||||
+# uritemplate>=3.0.0,<4.2.0
|
! uritemplate>=3.0.0,<4.2.0
|
||||||
+# pyasn1-modules>=0.0.8,<0.5.0
|
! pyasn1-modules>=0.0.8,<0.5.0
|
||||||
+# pyasn1>=0.1.9,<0.7.0
|
! pyasn1>=0.1.9,<0.7.0
|
||||||
+# PyDrive2>=1.3.1,<1.22.0
|
! PyDrive2>=1.3.1,<1.22.0
|
||||||
+# PyYAML>=3.12,<6.1
|
! PyYAML>=3.12,<6.1
|
||||||
+# rsa>=3.4.2,<4.10.0
|
! rsa>=3.4.2,<4.10.0
|
||||||
+
|
|
||||||
+# Gmail
|
# Gmail
|
||||||
+google-auth-oauthlib>=0.4.3,<1.3.0
|
google-auth-oauthlib>=0.4.3,<1.3.0
|
||||||
google-api-python-client>=1.7.11,<2.200.0
|
--- 1,15 ----
|
||||||
+
|
# GDrive Integration
|
||||||
+# goodreads
|
! # google-api-python-client>=1.7.11,<2.200.0
|
||||||
+goodreads>=0.3.2,<0.4.0
|
! # gevent>20.6.0,<24.3.0
|
||||||
+python-Levenshtein>=0.12.0,<0.27.0
|
! # greenlet>=0.4.17,<3.2.0
|
||||||
+
|
! # httplib2>=0.9.2,<0.23.0
|
||||||
+# ldap login
|
! # oauth2client>=4.0.0,<4.1.4
|
||||||
+python-ldap>=3.0.0,<3.5.0
|
! # uritemplate>=3.0.0,<4.2.0
|
||||||
+Flask-SimpleLDAP>=1.4.0,<2.1.0
|
! # pyasn1-modules>=0.0.8,<0.5.0
|
||||||
+
|
! # pyasn1>=0.1.9,<0.7.0
|
||||||
+# oauth
|
! # PyDrive2>=1.3.1,<1.22.0
|
||||||
+Flask-Dance>=2.0.0,<7.1.0
|
! # PyYAML>=3.12,<6.1
|
||||||
+SQLAlchemy-Utils>=0.33.5,<0.42.0
|
! # rsa>=3.4.2,<4.10.0
|
||||||
+
|
|
||||||
+# metadata extraction
|
# Gmail
|
||||||
+rarfile>=3.2,<5.0
|
google-auth-oauthlib>=0.4.3,<1.3.0
|
||||||
+scholarly>=1.2.0,<1.8
|
***************
|
||||||
+markdown2>=2.0.0,<2.5.0
|
*** 45,47 ****
|
||||||
+html2text>=2020.1.16,<2024.2.26
|
--- 45,50 ----
|
||||||
+python-dateutil>=2.1,<2.10.0
|
|
||||||
+beautifulsoup4>=4.0.1,<4.13.0
|
|
||||||
+faust-cchardet>=2.1.18,<2.1.20
|
|
||||||
+py7zr>=0.15.0,<0.21.0
|
|
||||||
+mutagen>=1.40.0,<1.50.0
|
|
||||||
+pycountry>=20.0.0,<25.0.0
|
|
||||||
+
|
|
||||||
+# Comics
|
|
||||||
+natsort>=2.2.0,<8.5.0
|
|
||||||
+comicapi>=2.2.0,<3.3.0
|
|
||||||
+
|
|
||||||
+# Kobo integration
|
|
||||||
+jsonschema>=3.2.0,<4.24.0
|
|
||||||
+
|
|
||||||
+# QRCode for MagicLink
|
|
||||||
+qrcode>=8.0
|
|
||||||
+# GDrive Integration
|
|
||||||
+google-api-python-client>=1.7.11,<2.200.0
|
|
||||||
gevent>20.6.0,<24.3.0
|
|
||||||
greenlet>=0.4.17,<3.2.0
|
|
||||||
httplib2>=0.9.2,<0.23.0
|
|
||||||
\ No newline at end of file
|
|
||||||
@@ -45,3 +95,6 @@
|
|
||||||
|
|
||||||
# Kobo integration
|
# Kobo integration
|
||||||
jsonschema>=3.2.0,<4.24.0
|
jsonschema>=3.2.0,<4.24.0
|
||||||
+
|
+
|
||||||
+# QRCode for magic link
|
+ # QRCode for MagicLink
|
||||||
+qrcode>=8.0
|
+ qrcode>=8.0
|
||||||
\ No newline at end of file
|
|
||||||
|
|||||||
Reference in New Issue
Block a user