Change dockerfile, now bild also on arm64

This commit is contained in:
2024-12-27 14:11:12 +01:00
parent f244c9eb22
commit 4baabb4aa5
2 changed files with 31 additions and 27 deletions

View File

@@ -36,7 +36,8 @@ RUN \
&& apt install -y python3-pip \
&& apt install -y python3-venv \
&& apt install -y python3-dev \
&& apt install -y python3-setuptools
&& apt install -y python3-setuptools \
&& apt install -y golang-go
RUN echo "**** create tmp dir ****" 1>&2 \
&& mkdir -p /tmp
@@ -52,11 +53,18 @@ RUN \
&& make -f Makefile \
&& make -f Makefile install
RUN echo "***install kepubify from source" 1>&2 \
&& go install github.com/pgaskin/kepubify@latest \
&& mv ./root/go/bin/kepubify /usr/local/bin/
RUN echo "**** install python3 ****" 1>&2
ENV PYTHONUNBUFFERED=1
RUN python3 -m venv /app \
&& . /app/bin/activate \
&& pip3 install --no-cache --upgrade pip \
&& pip3 install --no-cache --upgrade setuptools \
&& pip3 install --no-cache --upgrade poetry \
&& pip3 install --no-cache cryptography \
&& pip3 install --no-cache ldap3 \
&& pip3 install --no-cache flask-ldap3-login \
@@ -70,10 +78,10 @@ COPY patches /tmp/patches
RUN echo "**** install calibre ****" 1>&2 \
# install calibre binary
ENV LD_LIBRARY_PATH /usr/lib:/opt/calibre/lib
ENV PATH $PATH:/opt/calibre/bin
ENV LC_ALL C
ENV CALIBRE_INSTALLER https://download.calibre-ebook.com/linux-installer.sh
ENV LD_LIBRARY_PATH=/usr/lib:/opt/calibre/lib
ENV PATH=$PATH:/opt/calibre/bin
ENV LC_ALL=C
ENV CALIBRE_INSTALLER=https://download.calibre-ebook.com/linux-installer.sh
RUN apt install -y libopengl0 \
&& apt install -y libegl1 \
&& apt install -y libxcb-cursor0 \
@@ -88,36 +96,21 @@ RUN echo "**** download calibre-web ****" 1>&2 \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi \
&& echo " ---> install version ${CALIBREWEB_RELEASE}" 1>&2 \
&& git clone --depth 1 --branch ${CALIBREWEB_RELEASE} https://github.com/janeczku/calibre-web.git /tmp/calibreweb \
&& cd /tmp/calibreweb \
&& mkdir -p src \
&& ln -s /tmp/calibreweb /tmp/calibreweb/src/calibreweb
&& git clone --depth 1 --branch ${CALIBREWEB_RELEASE} https://github.com/janeczku/calibre-web.git /app/calibreweb
RUN echo "**** apply calibre-web patches ****" 1>&2 \
&& cd /tmp/calibreweb/src/calibreweb \
&& cd /app/calibreweb \
&& for p in /tmp/patches/calibre-web/* ; do \
patch -p0 < ${p} ; \
done
RUN echo "**** build & install calibre-web ****" 1>&2 \
&& . /app/bin/activate \
&& cd /tmp/calibreweb/src/calibreweb \
&& pip3 install -U --no-cache-dir \
-r requirements.txt \
-r optional-requirements.txt \
&& cd .. \
&& pip3 install /tmp/calibreweb
&& cd /app/calibreweb \
&& pip3 install --no-cache \
-r requirements.txt \
-r optional-requirements.txt
RUN echo "***install kepubify" 1>&2 && \
if [ -z ${KEPUBIFY_RELEASE} ]; then \
KEPUBIFY_RELEASE=$(curl -sX GET "https://api.github.com/repos/pgaskin/kepubify/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi \
&& curl -o \
/usr/bin/kepubify -L \
https://github.com/pgaskin/kepubify/releases/download/${KEPUBIFY_RELEASE}/kepubify-linux-64bit \
&& chmod +x /usr/bin/kepubify
# ports and volumes
EXPOSE 8083
@@ -138,4 +131,4 @@ RUN mkdir -p /config \
USER ${PUID}:${PGID}
CMD /app/bin/python3 /app/lib/python3.12/site-packages/calibreweb/cps.py -p /config/app.db -g /config/gdrive.db -o /config/calibre-web.log
CMD /app/bin/python3 /app/calibreweb/cps.py -p /config/app.db -g /config/gdrive.db -o /config/calibre-web.log