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:
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).
I’m using the CLI interface via C# on the host machine.
var xLocalContext = uno.util.Bootstrap.defaultBootstrap_InitialComponentContext();
var xURLResolver = (XUnoUrlResolver)xLocalContext.getServiceManager().createInstanceWithContext("com.sun.star.bridge.UnoUrlResolver", xLocalContext);
// m_ServiceConnString = uno:socket,host=localhost,port=8101;urp;StarOffice.ComponentContext
var xRemoteContext = (XComponentContext)xURLResolver.resolve(m_ServiceConnString); //C# never returns from this line and doesn't error
var xRemoteFactory = (XMultiServiceFactory)xRemoteContext.getServiceManager();
return (XComponentLoader)xRemoteFactory.createInstance("com.sun.star.frame.Desktop");
Running an identical version of LibreOffice locally works fine. Any pointers you have would be greatly appreciated!
Thanks for the offer. I was able to figure out my issue: https://stackoverflow.com/q/48670724/402706, but I may take a look at your image anyway. Off hand, do you know if LibreOffice running headless in a Linux container can communicate successfully with a Windows machine. The windows container is massive by comparison, but I get “binary urp bridge disposed during call” with the Linux version of LibreOffice running in a Linux Container. This is why I went down the windows container route in the first place.