Skip to content

leowzz/unoserver-docker

 
 

Repository files navigation

Unoserver Container Image

Container image for unoserver

The environment

This Container image uses Alpine Linux as a base image and provides:

  • LibreOffice

  • unoserver

  • Fonts (Alpine packages)

    • font-noto

    • font-noto-cjk

    • font-noto-extra

    • terminus-font

    • ttf-font-awesome

    • ttf-dejavu

    • ttf-freefont

    • ttf-hack

    • ttf-inconsolata

    • ttf-liberation

    • ttf-mononoki

    • ttf-opensans

How to use it

Note
The docker can normally be replaced with podman as well.

In interactive mode

Just run:

docker run -it -v <your directory>:/data/ ghcr.io/unoconv/unoserver-docker

After you start the container, you can use unoconvert command to convert documents using LibreOffice.

or to convert directly using unoconvert:

docker run -it -v <your directory>:/data/ ghcr.io/unoconv/unoserver-docker unoconvert /data/document.docx /data/document.pdf

Docker maps your directory with /data directory in the container.

You might need to add the option :z or :Z like <your directory>:/data/:z or <your directory>:/data/:Z if you are using SELinux. See Docker docs or Podman docs.

In non-interactive (remote) mode

docker run -p 2003:2003 ghcr.io/unoconv/unoserver-docker

After you start the container, you can use unoconvert command to convert documents using LibreOffice.

Note
You must use --host-location otherwise unoconvert will default to local although running unoserver in a container should be handled as remote.
unoconvert --host-location remote example.docx example.pdf

FAQ

  1. Why do I get an error during when converting is writing/exporting to file?

  2. It’s very likely that you haven’t given the container write permission to the mounted data directory. See: Issue #44

How to contribute / do it yourself?

Requirements

You need the following tools:

  • A bash compliant command line

  • Docker installed and in your path

How to build

docker build .

About

Docker files for a dockerized unoserver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dockerfile 42.0%
  • Shell 34.3%
  • Python 23.7%