add a Fedora DockerFile

similar to the openSUSE one. Tracks latest fedora, assumes 999 as
the cool userid

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibaf564d84a08314e39d8cca2446b8bfac8a01371
This commit is contained in:
Caolán McNamara 2024-07-02 21:55:21 +01:00 committed by Michael Meeks
parent 8a8149b292
commit 7181a6ca94

37
docker/from-source/Fedora Normal file
View file

@ -0,0 +1,37 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
FROM fedora:latest
# install LibreOffice run-time dependencies
# install timezone data to accept the TZ environment variable
# install an editor
RUN dnf -y install libcap libpng fontconfig nano openssl inotify-tools
# copy freshly built LOKit and Collabora Online
COPY /instdir /
# copy the shell script which can start Collabora Online (coolwsd)
COPY /start-collabora-online.sh /
# set up Collabora Online (normally done by postinstall script of package)
# Fix permissions
RUN setcap cap_fowner,cap_chown,cap_sys_chroot=ep /usr/bin/coolforkit && \
setcap cap_sys_admin=ep /usr/bin/coolmount && \
groupadd -r cool && \
useradd -g cool -r cool -d /opt/cool -s /bin/bash && \
rm -rf /opt/cool && \
mkdir -p /opt/cool/child-roots && \
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
touch /var/log/coolwsd.log && \
chown cool:cool /var/log/coolwsd.log && \
chown -R cool:cool /opt/ && \
chown -R cool:cool /etc/coolwsd
EXPOSE 9980
# switch to cool user (use numeric user id to be compatible with Kubernetes Pod Security Policies)
USER 999
CMD ["/start-collabora-online.sh"]