|
|
# Dockerfile for Enhanced DOCX to PDF Converter |
|
|
FROM ubuntu:22.04 |
|
|
|
|
|
# Set environment |
|
|
ENV |
|
|
ENV |
|
|
ENV |
|
|
ENV |
|
|
|
|
|
# Install |
|
|
RUN |
|
|
python3 |
|
|
python3-pip |
|
|
libreoffice |
|
|
libreoffice-writer |
|
|
libreoffice-l10n-ar |
|
|
libreoffice-help-ar |
|
|
fonts-liberation |
|
|
fonts-liberation2 |
|
|
fonts-dejavu |
|
|
fonts-dejavu-core |
|
|
fonts-dejavu-extra |
|
|
fonts-croscore |
|
|
fonts-noto-core |
|
|
fonts-noto-ui-core |
|
|
fonts-noto-mono |
|
|
fonts-noto-color-emoji |
|
|
fonts-noto-naskh |
|
|
fonts-noto-kufi-arabic |
|
|
fonts-opensymbol |
|
|
fonts-freefont-ttf |
|
|
fonts-amiri |
|
|
fonts-scheherazade-new |
|
|
fontconfig |
|
|
wget |
|
|
curl |
|
|
unzip |
|
|
locales |
|
|
&& rm /var//apt//* |
|
|
|
|
|
# Generate Arabic locale |
|
|
RUN locale-gen ar_SA.UTF-8 |
|
|
|
|
|
# Set working directory |
|
|
WORKDIR / |
|
|
|
|
|
# Copy |
|
|
COPY |
|
|
RUN |
|
|
|
|
|
# Copy |
|
|
COPY / src/ |
|
|
COPY |
|
|
|
|
|
# Setup |
|
|
RUN /usr//fonts//local-arial |
|
|
RUN cp arial.ttf //share//truetype// |
|
|
RUN fc-cache -fv |
|
|
|
|
|
# Create necessary directories |
|
|
RUN mkdir -p //conversions |
|
|
|
|
|
# Expose port |
|
|
EXPOSE 7860 |
|
|
|
|
|
# Health check |
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ |
|
|
CMD curl -f http: |
|
|
|
|
|
# Run the application |
|
|
CMD [, ] |