diff --git a/.gitea/workflows/build-push.yaml b/.gitea/workflows/build-push.yaml index a129dc3..0bc8f76 100644 --- a/.gitea/workflows/build-push.yaml +++ b/.gitea/workflows/build-push.yaml @@ -29,4 +29,4 @@ jobs: - name: Push Docker image run: | - docker push --max-concurrent-uploads 2 gargoton.petite-maison-orange.fr/image/calibre-web:latest \ No newline at end of file + docker push gargoton.petite-maison-orange.fr/image/calibre-web:latest \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index f81e87b..95cf4f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -111,26 +111,24 @@ RUN echo "**** copy unrar and kepubify to app folder ****" 1>&2 \ && mv /usr/bin/unrar /app/bin \ && mv ./root/go/bin/kepubify /app/bin - -# ports and volumes -EXPOSE 8083 -VOLUME /config -VOLUME /books -ENV PUID=1000 -ENV PGID=1000 + +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 PyDrive2 +RUN yes | /app/bin/pip3 uninstall PyYAML +RUN yes | /app/bin/pip3 uninstall rsa + ENV TZ=Europe/Paris - -RUN \ -echo "**** Setting timezone ****" \ -&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ -&& echo $TZ > /etc/timezone - -RUN mkdir -p /config \ - && chown -R ${PUID}:${PGID} /config +RUN cp /usr/share/zoneinfo/$TZ /etc/localtime FROM debian:trixie-slim AS production + # ports and volumes EXPOSE 8083 VOLUME /config @@ -141,21 +139,20 @@ ENV PGID=1000 ENV TZ=Europe/Paris -RUN \ - echo "**** install production packages ****" 1>&2 \ - && apt update \ - && apt install -y tzdata \ - && apt install -y libzmq5 \ - && apt install -y libldap-2.5-0 \ - && apt install -y libsasl2-2 \ - && apt install -y libnspr4 \ - && apt install -y libnss3 \ - && apt install -y imagemagick \ - && apt install -y bash \ - && apt install -y procps \ - && apt install -y vim \ - && apt install -y python3 +RUN echo "**** install production packages ****" 1>&2 +RUN apt-get update +RUN apt-get install --no-install-recommends -y tzdata \ + libzmq5 \ + libldap-2.5-0 \ + libsasl2-2 \ + libnspr4 \ + libnss3 \ + imagemagick \ + bash \ + procps \ + vim \ + python3 COPY --from=build /app /app COPY --from=build /opt/calibre/bin /app/bin @@ -170,16 +167,14 @@ RUN rm -rf /var/lib/apt/lists/* \ /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 PyDrive2 -RUN yes | /app/bin/pip3 uninstall PyYAML -RUN yes | /app/bin/pip3 uninstall rsa - +RUN echo "**** Setting timezone ****" 2>&1 \ + && echo $TZ > /etc/timezone +COPY --from=build /etc/timezone /etc/timezone + + +RUN mkdir -p /config \ + && chown -R ${PUID}:${PGID} /config + WORKDIR /app USER ${PUID}:${PGID}