I'm using the following Dockerfile:
# Install OpenJDK, LibreOffice, and Xorg ServerRUN apk add openjdk11-jreRUN apk add libreofficeRUN apk add libreoffice-writerRUN apk add ttf-freefontRUN apk add libreoffice-commonRUN apk add --no-cache msttcorefonts-installer fontconfig && \ update-ms-fonts && \ fc-cache -f
When I try to run this command:
export HOME=/app/www/protocolo-online/public && libreoffice --headless --nologo --convert-to pdf /app/www/protocolo-online/storage/desenvolvimento/titulo-legitimacao-775/titulo-legitimacao-individual-1233.docx --outdir /app/www/protocolo-online/storage/desenvolvimento/titulo-legitimacao-775
I get the following error:
usr/lib/libreoffice/program/soffice.bin X11 error: Can't open display: Set DISPLAY environment variable, use -display option or check permissions of your X-Server (See "man X" resp. "man xhost" for details)
Can anyone help me?