Installing Finnish language spell checking inside the docker image

Hi.

I have installed CODE in a docker image and successfully hooked it up to Nextcloud. I would like it to provide Finnish language spellcheck, but it is not supported by libreoffice via the typical dictionaries (for what I believe to be grammatical reasons). I found the way to add normal dictionaries to the docker image with parameters of the format -e 'dictionaries=de en es ..'. This does not work for Finnish, however.

Finnish spellcheck depends on the Voikko project, which is available for Ubuntu (which I believe the image to be) via the libreoffice-voikko package, the installation of which sets up (tested today in a Xubuntu vm) everything necessary with at least Libreoffice and the desktop install.

Is there an elegant way to add this package to the docker image (such as it is from docker hub, in all its auto-updating glory), or do I need to fork the docker files and add it in manually? (Thus having to worry about future breakage) Is there some other elegant way to get Finnish spellcheck to work?

Thanks in advance.

Edit: would docker layers be an elegant way to do this?

Edit2: I tried with this small Dockerfile

FROM collabora/code:latest
USER root
RUN apt update
RUN apt install libreoffice-voikko -y
USER lool
RUN whoami

This seems to run all the way, including the whoami command. libreoffice-voikko seems to install correctly, and to correctly hook up with Nextcloud when started with

docker run -t -d -p 9980:9980 --restart always -e "domain=<my nextcloud domain>|<my collabora domain>" -e "extra_params=--o:ssl.enable=false --o:ssl.termination=true" <hash of the docker>

No sign of a Finnish dictionary though, with or without -e "dictionaries=fi".

I’ve been inspecting the ubuntu package for libreoffice-voikko and it seems to copy voikko’s files to /usr/lib/libreoffice/share/extensions/ which doesn’t exist in the docker file as is. I tried soft linking (and hard copying) those files to /opt/collaboraoffice6.4/share/extensions/, which exists and seemed similar. This didn’t seem to work.

Where should one put extensions with CODE?