|
|
| FROM ubuntu:22.04
|
|
|
|
|
| ENV DEBIAN_FRONTEND=noninteractive
|
| ENV LANG=C.UTF-8
|
| ENV PYTHONUNBUFFERED=1
|
|
|
|
|
|
|
| RUN apt-get update && \
|
| apt-get install -y \
|
| python3 \
|
| python3-pip \
|
| python3-uno \
|
| python3-setuptools \
|
| python3-wheel \
|
| python3-dev \
|
| build-essential \
|
| libreoffice \
|
| libreoffice-writer \
|
| libreoffice-java-common \
|
| default-jre \
|
| fonts-liberation \
|
| fonts-noto-core \
|
| fonts-noto-mono \
|
| fonts-noto-color-emoji \
|
| fonts-freefont-ttf \
|
| fontconfig \
|
| && apt-get clean && \
|
| rm -rf /var/lib/apt/lists/*
|
|
|
| WORKDIR /app
|
|
|
|
|
| COPY requirements.txt .
|
| COPY fonts.conf .
|
|
|
|
|
| RUN pip3 install --no-cache-dir -r requirements.txt
|
|
|
|
|
| COPY fonts/ /usr/share/fonts/truetype/arabic-enhanced/
|
|
|
|
|
| RUN mkdir -p /etc/fonts/conf.d && \
|
| cp fonts.conf /etc/fonts/local.conf && \
|
| fc-cache -fv
|
|
|
|
|
| RUN fc-list | grep -i "arial" | head -n 5
|
|
|
|
|
| COPY app ./app
|
| COPY start.sh .
|
|
|
|
|
| RUN useradd -m -u 1000 user
|
|
|
| RUN chown -R user:user /app
|
| RUN chmod +x start.sh
|
|
|
| USER user
|
| ENV HOME=/home/user \
|
| PATH=/home/user/.local/bin:$PATH
|
|
|
| EXPOSE 7860
|
|
|
| CMD ["./start.sh"]
|
|
|