Container image for unoserver
This Container image uses Alpine Linux as a base image and provides:
-
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
-
Note
|
The docker can normally be replaced with podman as well.
|
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.
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
-
Why do I get an error during when converting is writing/exporting to file?
-
It’s very likely that you haven’t given the container write permission to the mounted data directory. See: Issue #44