The project is looking for a new maintainer. If you are interested then please write in the following issue: unoconv#97
Container image for unoserver
This repository is a fork of unoconv/unoserver-docker. Some content below is inherited from upstream and may not fully reflect fork-specific behavior.
In this fork branch custom, Dockerfile is intentionally kept aligned with upstream to reduce merge friction. Use Dockerfile.custom for branch-specific hardened builds.
The fork is designed and validated primarily for linux/amd64.
linux/arm64 support is kept for upstream compatibility and multi-arch publishing continuity.
Workflow verification steps are architecture-aware:
-
Build and image scanning run for both
linux/amd64andlinux/arm64 -
Integration validation with
pytestruns only onlinux/amd64
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-dockerAfter 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.pdfDocker 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-dockerAfter 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.pdfThis fork includes an optional AppArmor profile for Ubuntu 24.04 hosts and compatible AppArmor-enabled Linux systems.
The profile is intended for the stateless network service runtime. It does not
support the inherited interactive examples that bind mount host directories to
/data; /data is intentionally denied by the profile.
scripts/apparmor/unoserver-profile.sh check
sudo scripts/apparmor/unoserver-profile.sh enable
APPARMOR_PROFILE=docker-unoserver scripts/unoserver/run-local.shFor Docker Compose, enable the profile and add the override file:
sudo scripts/apparmor/unoserver-profile.sh enable
docker compose -f docker-compose.latest.yml -f docker-compose.apparmor.yml upSee docs/apparmor.md for the threat model, operational impact, disable/remove commands, and troubleshooting. == FAQ
-
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