-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
49 lines (38 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM node:22-alpine AS zimui
WORKDIR /src
COPY zimui /src
RUN yarn install --frozen-lockfile
RUN yarn build
FROM python:3.12-bookworm
LABEL org.opencontainers.image.source=https://github.com/openzim/mindtouch
# Install necessary packages
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
unzip \
ffmpeg \
aria2 \
&& rm -rf /var/lib/apt/lists/* \
&& python -m pip install --no-cache-dir -U \
pip
RUN mkdir -p /output
WORKDIR /output
# Copy pyproject.toml and its dependencies
COPY README.md /src/
COPY scraper/pyproject.toml scraper/openzim.toml /src/scraper/
COPY scraper/src/mindtouch2zim/__about__.py /src/scraper/src/mindtouch2zim/__about__.py
# Install Python dependencies
RUN pip install --no-cache-dir /src/scraper
# Copy code + associated artifacts
COPY scraper/src /src/scraper/src
COPY *.md LICENSE /src/
# Install + cleanup
RUN pip install --no-cache-dir /src/scraper \
&& rm -rf /src/scraper
# Copy zimui build output
COPY --from=zimui /src/dist /src/zimui
ENV MINDTOUCH_ZIMUI_DIST=/src/zimui \
MINDTOUCH_OUTPUT=/output \
MINDTOUCH_TMP=/tmp\
MINDTOUCH_CONTACT_INFO=https://www.kiwix.org
CMD ["mindtouch2zim", "--help"]