diff --git a/Dockerfile b/Dockerfile index 3eda756..b66e3d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -130,6 +130,16 @@ RUN mkdir -p /config \ FROM debian:trixie-slim AS production +# ports and volumes +EXPOSE 8083 +VOLUME /config +VOLUME /books + +ENV PUID=1000 +ENV PGID=1000 +ENV TZ=Europe/Paris + + RUN \ echo "**** install production packages ****" 1>&2 \ && apt update \ @@ -152,6 +162,26 @@ COPY --from=build /opt/calibre/lib/libjpeg.so.8 /usr/lib/libjpeg.so.8 COPY --from=build /opt/calibre/lib/libpython3.11.so.1.0 /usr/lib/libpython3.11.so.1.0 COPY --from=build /opt/calibre/lib/libpoppler.so.130 /usr/lib/libpoppler.so.130 +RUN apt-get clean +RUN rm -rf /var/lib/apt/lists/* \ + /tmp/* \ + /var/tmp/* \ + /usr/share/doc/* + +RUN yes | /app/bin/pip3 uninstall google-api-python-client +RUN yes | /app/bin/pip3 uninstall gevent +RUN yes | /app/bin/pip3 uninstall greenlet +RUN yes | /app/bin/pip3 uninstall httplib2 +RUN yes | /app/bin/pip3 uninstall oauth2client +RUN yes | /app/bin/pip3 uninstall uritemplate +RUN yes | /app/bin/pip3 uninstall pyasn1-modules +RUN yes | /app/bin/pip3 uninstall pyasn1 +RUN yes | /app/bin/pip3 uninstall PyDrive2 +RUN yes | /app/bin/pip3 uninstall PyYAML +RUN yes | /app/bin/pip3 uninstall rsa + + +WORKDIR /app USER ${PUID}:${PGID} CMD /app/bin/python3 /app/calibreweb/cps.py -p /config/app.db -g /config/gdrive.db -o /config/calibre-web.log \ No newline at end of file