I am trying to create a headless installation of LibreOffice under Windows Server Core 2016. My goal is to have a container that allow me to create on the fly documents based on templates. I have done it previously with a Linux-based image (something like this: https://hub.docker.com/r/xcgd/libreoffice/), but now I need the same to be run under Docker for Windows Server 2016.
I am able to make an unnatended installation of LibreOffice 5.3 under Windows Server Core from my Dockerfile:
RUN powershell -Command _
_ $ErrorActionPreference = ‘Stop’; \ _
_ Invoke-WebRequest -Method Get -Uri %LIBREOFFICE_URL% -OutFile c:\LibreOffice.msi ; _
_ Start-Process c:\LibreOffice.msi -ArgumentList ‘/qr /msoreg=0 ADDLOCAL=ALL CREATEDESKTOPLINKE=0 REGISTER_ALL_SMO_TYPES=1 REGISTER_DOC=1 INSTALLLOCATION=c:\LibreOffice REMOVE=gm_o_Onlineupdate,gm_p_Base,gm_p_Base_Bin,gm_o_Xsltfiltersamples RebootYesNo=No’ -Wait ; \ _
_ Remove-Item c:\LibreOffice.msi -Force
However LibreOffice does not work after installed:
CMD “C:\LibreOffice\program\soffice.exe -headless -accept=‘socket,host=127.0.0.1,port=8101;urp;’ -nofirststartwizard”
With no error message and no clue about the problem. I suppose is some related with the absense of GUI (despite the fact that the headless mode has been made to run LibreOffice as a service).
Has anyone tried to to the same?