2025-02-03 14:40:20 +00:00
|
|
|
FROM python:3.13-slim-bookworm
|
2025-01-07 13:12:33 +00:00
|
|
|
LABEL org.opencontainers.image.source=https://github.com/openzim/warc2zim
|
2020-07-28 11:37:13 +02:00
|
|
|
|
|
|
|
RUN apt-get update -y \
|
2024-01-18 17:15:16 +01:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2024-08-05 09:44:48 +00:00
|
|
|
locales-all libmagic1 libcairo2 \
|
2024-01-18 17:15:16 +01:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& python -m pip install --no-cache-dir -U \
|
|
|
|
pip \
|
|
|
|
&& mkdir -p /output
|
2020-07-28 11:37:13 +02:00
|
|
|
|
|
|
|
WORKDIR /output
|
2024-01-18 17:15:16 +01:00
|
|
|
|
|
|
|
# Copy pyproject.toml and its dependencies
|
2025-01-07 13:12:33 +00:00
|
|
|
COPY pyproject.toml README.md /src/
|
2024-01-18 17:15:16 +01:00
|
|
|
COPY src/warc2zim/__about__.py /src/src/warc2zim/__about__.py
|
|
|
|
|
|
|
|
# Install Python dependencies
|
|
|
|
RUN pip install --no-cache-dir /src
|
|
|
|
|
|
|
|
# Copy code + associated artifacts
|
|
|
|
COPY src /src/src
|
|
|
|
COPY *.md /src/
|
|
|
|
|
|
|
|
# Install + cleanup
|
|
|
|
RUN pip install --no-cache-dir /src \
|
|
|
|
&& rm -rf /src
|
|
|
|
|
2020-07-28 11:37:13 +02:00
|
|
|
CMD ["warc2zim", "--help"]
|