Open dkobia opened 2 years ago
Hello @dkobia and thank you for your report.
Does the same Dockerfile work on a Linux host? Can we have more details? (e.g. the Dockerfile used to build the container, the content of the preview
command).
We also saw Mac users having not enough memory for libreoffice to successfully produce PDFs. For instance, see https://github.com/algoo/preview-generator/issues/234
@raphj -- I haven't tested on a linux host.
Dockerfile
FROM python:3.9.6-slim-buster
RUN apt update && apt install -y zlib1g-dev build-essential \
openssl libssl-dev libcurl4-openssl-dev \
libjpeg-dev python3-pythonmagick inkscape \
xvfb poppler-utils libfile-mimeinfo-perl \
qpdf libimage-exiftool-perl ffmpeg ghostscript \
libsecret-1-0 libreoffice inkscape ufraw-batch \
wget
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
CMD python main.py
requirements.txt
boto3==1.18.22
preview-generator[all]==0.23
download sample doc file
$ wget https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.doc
run preview command
preview *.doc
Description and expectations
Office documents cannot generate inside Docker on a Mac.
Error:
Generated files:
How to reproduce
FROM python:3.9.6-slim-buster
apt-get
andpip
$ wget https://file-examples-com.github.io/uploads/2017/02/file-sample_100kB.doc
$ preview *.doc
Version information
Version
0.23