Skip to content

AlwinEgger/docker-image-jodconverter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wat

Uses the great implementation of Simon Braconnier JODconverter to offer LibreOffice as an Document-Converter Web-Service.

This docker image is a "all you need" and should help you running JODconverter as a WebApp utilizing the packaged LibreOffice for conversions. Ultimately this should be your "document conversion chain" service

To run this in a production-ready stack, please see the follow-up project eugenmayer/converter

Builds info

  • Official OpenJDK 11 Java (bellsoft debian based)(since that is what we want with docker)
  • LibreOffice is 6.1.5+ right now

Hint: We cannot split JODconverter and LibreOffice into two separate images since for now, JODconverter has to be running on the same machine as LibreOffice. The main reason behind this is, that JODconverter does manage the LibreOffice instances itself, starts and stop them. It does not just connect to it (and if, it uses a local socket)

Run

Thats the variant with a web-GUI (see screenshot)

docker run --memory 512m --rm -p 8080:8080 eugenmayer/jodconverter:gui

Now you can connect to http://localhost:8080 with a nice web-ui for conversion

Screenshot

Or you pick the variant a REST interface only

docker run --memory 512m  --rm -p 8080:8080 eugenmayer/jodconverter:rest

Screenshot

For more please check the wiki at https://github.com/sbraconnier/jodconverter

To run this in a production-ready stack, please see the follow-up project eugenmayer/converter

Docker images

  • eugenmayer/jodconverter:base - OpenJDK 11: libreoffice included, also start scripts but now actual applications
  • eugenmayer/jodconverter:gui - OpenJDK 10 yet (see this issue): the WebGUI, spring based converter
  • eugenmayer/jodconverter:rest - OpenJDK 10 yet (see this issue) rest only variant

Configuration

You can configure the docker images by mounting /etc/app/application.properties and put whatever you like into them.

For example if you like to have 2 LibreOffice instances, you would put into the file

# amount of libreOffice instances to start - one for each given port. So this means 2
jodconverter.local.port-numbers: 2002, 2003
# change the tmp folder
jodconverter.local.working-dir: /tmp
# change upload sizes
spring.servlet.multipart.max-file-size: 5MB
spring.servlet.multipart.max-request-size: 5MB
# change the server port (where the REST app is listenting
server.port=8090

Build youerself

make build
make start-gui
# or
make start-rest

now see above under "Run" how to access it

Credits

All of those please forward to sbraconnier's jodconverter - he does the real work :) And of course also credits to LibreOffice for actually giving us the headless mode and the conversion options in the first place

About

Docker image with jodconverter + libreoffice for document conversion through a REST api

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 64.9%
  • Makefile 18.2%
  • Shell 16.9%