Skip to content
 
 

Repository files navigation

The project is looking for a new maintainer. If you are interested then please write in the following issue: unoconv#97

Unoserver Container Image

Container image for unoserver

Fork-specific scope

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/amd64 and linux/arm64

  • Integration validation with pytest runs only on linux/amd64

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

Optional AppArmor confinement

This 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.sh

For 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 up

See docs/apparmor.md for the threat model, operational impact, disable/remove commands, and troubleshooting. == 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

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages