Monthly Archives: August 2017

Changing the Collabora Online default template language

The latest version of the Collabora Online Development Edition Docker image at the time of writing defaults to German language. This manifests as unexpected behaviour for English language input in new Collabora Online documents, such as quotation marks appearing inverted:

CODE-DefaultLanguage-1.png

Fixing this involves changing the default language of the underlying ODF template files. In this example we’re using Collabora Online in a Nextcloud 12 host, running in Ubuntu 16.04:

1. Locate the ODF templates at /var/www/html/nextcloud/core/templates/filetemplates

2. Copy the templates to another system with LibreOffice loaded. Open them in LibreOffice (there are three files in ODF, ODS, and ODP format) and update the language to the English variant of your choice (for example English (New Zealand).

3. Copy them back to the Nextcloud host. Restart Apache and the Collabora Online Docker container, and confirm that new documents have the expected behaviour.

Reference:

Advertisements

Run Docker in an LXD container

I’m a fan of Canonical’s LXD containers—which essentially copy the same approach to lightweight virtualisation enjoyed by Solaris Zones users (and by extension, any illumos-based distros such as SmartOS) for over ten years. One area however where Canoncial is playing catch-up compared to commercial UNIX is in incomplete documentation spread out absolutely everywhere—blog posts, articles, wikis, and so on. Trying to find consistent information on the level of support for Docker running in an LXD container is a perfect example of this. It’s a real mess.

At the time of writing, running Docker as installed from the official Docker repository will fail in an LXD container. This is noted in the following two bug reports:

The advice provided in both reports is to use Ubuntu’s Docker packages:

“Only Docker coming from Ubuntu (docker.io package) works inside LXD containers.

“The Docker coming from upstream is missing a number of patches to make it work, leading to the problem you describe above. We’ve been pushing for those changes to be merged upstream and some were, but we’re not yet at a point where the upstream packages work.”

Otherwise, the prerequisite for running Docker in LXD is that the container is launched with the docker profile applied, and is configured as a privileged container (by default, LXC containers are unprivileged). In the following example, the nextcloud-dev-1 container is created with the default and docker profiles applied, and its configuration is set to be privileged:

$ sudo lxc launch ubuntu:16.04 nextcloud-dev-1 -p default -p docker -c security.privileged=true

Post installation, log into the container and install the Ubuntu Docker package:

$ sudo apt install docker.io

From there, Docker should work as expected.

More on privileged containers is here: