Fix PDF issue

This commit is contained in:
hayano
2024-11-09 09:50:58 +00:00
parent 27aed10a4a
commit 2ca77b604b
6 changed files with 300 additions and 101 deletions

View File

@ -45,8 +45,36 @@ RUN apt-get update && \
libreoffice \
libreoffice-calc \
libreoffice-writer \
libreoffice-java-common \
fonts-ipafont \
fonts-ipafont-gothic \
fonts-ipafont-mincho \
language-pack-ja \
fontconfig \
locales \
python3-uno # LibreOffice Python バインディング
# 日本語ロケールの設定
RUN locale-gen ja_JP.UTF-8
ENV LANG=ja_JP.UTF-8
ENV LC_ALL=ja_JP.UTF-8
ENV LANGUAGE=ja_JP:ja
# フォント設定ファイルをコピー
COPY config/fonts.conf /etc/fonts/local.conf
# フォントキャッシュの更新
RUN fc-cache -f -v
# LibreOfficeの作業ディレクトリを作成
RUN mkdir -p /var/cache/libreoffice && \
chmod 777 /var/cache/libreoffice
# フォント設定の権限を設定
RUN chmod 644 /etc/fonts/local.conf
# 作業ディレクトリとパーミッションの設定
RUN mkdir -p /app/docbase /tmp/libreoffice && \
chmod -R 777 /app/docbase /tmp/libreoffice
@ -66,6 +94,8 @@ RUN apt-get update
COPY ./requirements.txt /app/requirements.txt
RUN pip install boto3==1.26.137
# Install Gunicorn
RUN pip install gunicorn