2021-01-11 04:38:01 -06:00
|
|
|
# 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 opensuse/leap
|
|
|
|
|
|
|
|
# refresh repos otherwise installations later may fail
|
|
|
|
# install LibreOffice run-time dependencies
|
2022-07-12 16:24:01 -05:00
|
|
|
# install timezone data to accept the TZ environment variable
|
2021-01-11 04:38:01 -06:00
|
|
|
# install an editor
|
|
|
|
# tdf#117557 - Add CJK Fonts to Collabora Online Docker Image
|
|
|
|
RUN zypper ref && \
|
2022-07-12 16:24:01 -05:00
|
|
|
zypper --non-interactive install libcap-progs libpng16-16 fontconfig nano openssh inotify-tools timezone
|
2021-01-11 04:38:01 -06:00
|
|
|
|
|
|
|
# copy freshly built LOKit and Collabora Online
|
|
|
|
COPY /instdir /
|
|
|
|
|
2021-11-18 06:08:14 -06:00
|
|
|
# copy the shell script which can start Collabora Online (coolwsd)
|
2021-01-11 04:38:01 -06:00
|
|
|
COPY /start-collabora-online.sh /
|
2022-03-31 11:02:30 -05:00
|
|
|
COPY /start-collabora-online.pl /
|
2021-01-11 04:38:01 -06:00
|
|
|
|
|
|
|
# set up Collabora Online (normally done by postinstall script of package)
|
|
|
|
# Fix permissions
|
2021-11-16 03:59:05 -06:00
|
|
|
RUN setcap cap_fowner,cap_chown,cap_mknod,cap_sys_chroot=ep /usr/bin/coolforkit && \
|
2021-11-17 11:08:27 -06:00
|
|
|
setcap cap_sys_admin=ep /usr/bin/coolmount && \
|
2021-11-15 09:57:33 -06:00
|
|
|
groupadd -r cool && \
|
|
|
|
useradd -g cool -r cool -d /opt/cool -s /bin/bash && \
|
|
|
|
rm -rf /opt/cool && \
|
2021-11-15 09:51:11 -06:00
|
|
|
mkdir -p /opt/cool/child-roots && \
|
2021-11-17 15:09:50 -06:00
|
|
|
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
|
2021-11-18 06:08:14 -06:00
|
|
|
touch /var/log/coolwsd.log && \
|
|
|
|
chown cool:cool /var/log/coolwsd.log && \
|
2021-11-15 10:04:57 -06:00
|
|
|
chown -R cool:cool /opt/ && \
|
2021-11-18 06:08:14 -06:00
|
|
|
chown -R cool:cool /etc/coolwsd
|
2021-01-11 04:38:01 -06:00
|
|
|
|
|
|
|
EXPOSE 9980
|
|
|
|
|
2021-11-15 10:04:57 -06:00
|
|
|
# switch to cool user (use numeric user id to be compatible with Kubernetes Pod Security Policies)
|
2022-02-22 03:46:21 -06:00
|
|
|
USER 498
|
2021-01-11 04:38:01 -06:00
|
|
|
|
2021-10-11 15:44:24 -05:00
|
|
|
CMD ["/start-collabora-online.sh"]
|