aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 2e6a62d2cb4101c304fe63a0f54e04643d578270 (plain)
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
FROM ubuntu:24.04

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

# system deps + libreoffice fresh ppa
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        software-properties-common \
        ca-certificates && \
    add-apt-repository -y ppa:libreoffice/ppa && \
    apt-get update && \
    apt-get install -y --no-install-recommends \
        python3 \
        python3-pip \
        python3-venv \
        libreoffice \
        poppler-utils \
        fonts-liberation \
        fonts-dejavu-core && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# python deps
COPY src/requirements.txt /tmp/requirements.txt
RUN pip3 install --no-cache-dir --no-compile --break-system-packages -r /tmp/requirements.txt

# kjandoc binary -> /usr/local/bin
COPY src/kjandoc /usr/local/bin/kjandoc
RUN chmod +x /usr/local/bin/kjandoc

# demoware
WORKDIR /app
COPY demoware/ /app/

# storage dirs
RUN mkdir -p /app/uploads /app/output

EXPOSE 8080

CMD ["python3", "server.py"]