Install Libreoffice (JodConverter) with dockerfile

Showing results for 
Search instead for 
Did you mean: 
Active Member

Install Libreoffice (JodConverter) with dockerfile


I use alfresco-content-repository-community:7.3.1 (docker)

I need to use jodconverter in java process. So I updated my Dockerfile as follow, in order to install LibreOffice :

#Installing LibreOffice
COPY backend/LibreOffice_6.3.5.2_Linux_x86-64_rpm /usr/local/LibreOffice_6.3.5.2_Linux_x86-64_rpm
RUN cd /usr/local/LibreOffice_6.3.5.2_Linux_x86-64_rpm/RPMS/
RUN yum -y install /usr/local/LibreOffice_6.3.5.2_Linux_x86-64_rpm/RPMS/*.rpm;


I find libreoffice6.3 in /opt folder inside container. However "libreoffice -_version" says : 

bash: libreoffice: command not found


When the java process is executed i get the following error: ServiceManager' started but its pid could not be found :

OfficeProcessManager          : Submitting task 'Start' and waiting...
2023-08-03 13:51:37.133  INFO 1 --- [ProcessThread-0]    : Starting process with acceptString 
'socket,host=,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' and 
profileDir '/usr/local/tomcat/temp/.jodconverter_socket_host- 
2023-08-03 13:51:37.148  INFO 1 --- [ProcessThread-0]    : Started process; pid = -2
2023-08-03 13:51:37.149 ERROR 1 --- [TaskScheduler16] 
c.m.service.TransformationService     : ERROR convertToDocx: A process with acceptString 'socket,host=,port=2002,tcpNoDelay=1;urp;StarOffice.ServiceManager' started but its pid could not be found
    at java.base/
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(
    at java.base/java.util.concurrent.ThreadPoolExecutor$
    at java.base/

2023-08-03 13:51:37.150  INFO 1 --- [TaskScheduler16]     : Stopping the office manager pool...
2023-08-03 13:51:37.152  INFO 1 --- [TaskScheduler16]          
: Submitting task 'Stop' and waiting...
2023-08-03 13:51:37.159  INFO 1 --- [ProcessThread-0]    : Trying to forcibly terminate process: 
'host=,port=2002,tcpNoDelay=1'; pid: -2
2023-08-03 13:51:37.166  INFO 1 --- [ProcessThread-0]          
: process forcibly terminated with code 127
2023-08-03 13:51:37.166  INFO 1 --- [ProcessThread-0]          
: process exited with code 127
2023-08-03 13:51:37.174  INFO 1 --- [TaskScheduler16]     : Office manager stopped


This is my java code :

libreOfficeHome = libreoff.getValue();
        File initialFile = new File(workPath + "/" + fileName);
        LocalOfficeManager localOfficeManager = LocalOfficeManager.builder()
                .officeHome(libreOfficeHome) //your path to openoffice

        try {
            final DocumentFormat format = DocumentFormat.builder()

                  .convert(new FileInputStream(initialFile))
                  .to(new File(targetFile))

        } catch (Exception e) {
            logger.error("ERROR convertToDocx: " + ExceptionUtils.getStackTrace(e));
            return null;
        } finally {

Same error with libreoffice 7.5

How can I solve that ? Thx

1 Reply

Re: Install Libreoffice (JodConverter) with dockerfile

I think -version is not an option available. Try --help

Probably docker container is not able to execute the command to find the process id. Once your container is up try to manually access 'ps' command and see if it is still working. Also try to see if you can manually kill any process using "kill" command.

You may have to install procps 

look for appropriate command to install based on the your linux version. ACS 7.3 is based on rockylinux. 

You can find some help here :


(ACSCE, AWS SAA, Azure Admin)