Try to build a small image
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m35s
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m35s
This commit is contained in:
@@ -11,10 +11,10 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Gitea Docker Registry
|
- name: Log in to Gitea Docker Registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
|
|||||||
32
Dockerfile
32
Dockerfile
@@ -21,7 +21,7 @@ RUN \
|
|||||||
&& apt update \
|
&& apt update \
|
||||||
&& apt install -y build-essential \
|
&& apt install -y build-essential \
|
||||||
&& apt install -y tzdata \
|
&& apt install -y tzdata \
|
||||||
&& apt install -y libghc-zeromq4-haskell-dev \
|
&& apt install -y libzmq3-dev \
|
||||||
&& apt install -y libldap-dev \
|
&& apt install -y libldap-dev \
|
||||||
&& apt install -y libsasl2-dev \
|
&& apt install -y libsasl2-dev \
|
||||||
&& apt install -y imagemagick \
|
&& apt install -y imagemagick \
|
||||||
@@ -49,11 +49,10 @@ RUN \
|
|||||||
&& sed 's/^DEFINES=/DEFINES=-DUSE_FALLOCATE /' \
|
&& sed 's/^DEFINES=/DEFINES=-DUSE_FALLOCATE /' \
|
||||||
makefile > Makefile \
|
makefile > Makefile \
|
||||||
&& make -f Makefile \
|
&& make -f Makefile \
|
||||||
&& make -f Makefile install
|
&& make -f Makefile install
|
||||||
|
|
||||||
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
|
||||||
&& mv ./root/go/bin/kepubify /usr/local/bin/
|
|
||||||
|
|
||||||
|
|
||||||
RUN echo "**** install python3 ****" 1>&2
|
RUN echo "**** install python3 ****" 1>&2
|
||||||
@@ -66,8 +65,6 @@ RUN python3 -m venv /app \
|
|||||||
&& pip3 install --no-cache cryptography \
|
&& pip3 install --no-cache cryptography \
|
||||||
&& pip3 install --no-cache ldap3 \
|
&& pip3 install --no-cache ldap3 \
|
||||||
&& pip3 install --no-cache flask-ldap3-login \
|
&& pip3 install --no-cache flask-ldap3-login \
|
||||||
&& pip3 install --no-cache --upgrade pip setuptools \
|
|
||||||
&& pip3 install --no-cache --upgrade cython \
|
|
||||||
&& 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
|
||||||
|
|
||||||
@@ -109,6 +106,10 @@ RUN echo "**** build & install calibre-web ****" 1>&2 \
|
|||||||
-r requirements.txt \
|
-r requirements.txt \
|
||||||
-r optional-requirements.txt
|
-r optional-requirements.txt
|
||||||
|
|
||||||
|
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
|
# ports and volumes
|
||||||
EXPOSE 8083
|
EXPOSE 8083
|
||||||
@@ -127,6 +128,25 @@ echo "**** Setting timezone ****" \
|
|||||||
RUN mkdir -p /config \
|
RUN mkdir -p /config \
|
||||||
&& chown -R ${PUID}:${PGID} /config
|
&& chown -R ${PUID}:${PGID} /config
|
||||||
|
|
||||||
|
FROM debian:trixie-slim AS production
|
||||||
|
|
||||||
|
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 imagemagick \
|
||||||
|
&& apt install -y bash \
|
||||||
|
&& apt install -y sudo \
|
||||||
|
&& apt install -y python3
|
||||||
|
|
||||||
|
|
||||||
|
COPY --from=build /app /app
|
||||||
|
COPY --from=build /opt /
|
||||||
|
|
||||||
|
|
||||||
USER ${PUID}:${PGID}
|
USER ${PUID}:${PGID}
|
||||||
|
|
||||||
CMD /app/bin/python3 /app/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
|
||||||
Reference in New Issue
Block a user