2017-10-21 23:12:44 +02: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/.
|
|
|
|
|
2019-01-21 09:39:27 +01:00
|
|
|
FROM ubuntu:18.04
|
2017-10-21 23:12:44 +02:00
|
|
|
|
2019-09-05 13:12:56 +02:00
|
|
|
# refresh repos otherwise installations later may fail
|
2017-10-21 23:12:44 +02:00
|
|
|
# install LibreOffice run-time dependencies
|
2018-12-08 16:08:03 +01:00
|
|
|
# install adduser, findutils, openssl and cpio that we need later
|
2022-07-12 23:24:01 +02:00
|
|
|
# install tzdata to accept the TZ environment variable
|
2018-11-16 11:18:29 +01:00
|
|
|
# install an editor
|
2020-10-02 10:53:04 +02:00
|
|
|
# tdf#117557 - Add CJK Fonts to Collabora Online Docker Image
|
2020-05-15 10:01:38 +02:00
|
|
|
RUN apt-get update && \
|
2022-07-12 23:24:01 +02:00
|
|
|
apt-get -y install libpng16-16 fontconfig adduser cpio tzdata \
|
2021-01-11 11:38:01 +01:00
|
|
|
findutils nano \
|
2020-05-15 10:01:38 +02:00
|
|
|
libcap2-bin openssl openssh-client inotify-tools procps \
|
|
|
|
libxcb-shm0 libxcb-render0 libxrender1 libxext6 \
|
|
|
|
fonts-wqy-zenhei fonts-wqy-microhei fonts-droid-fallback \
|
|
|
|
fonts-noto-cjk
|
2018-05-11 13:15:40 +02:00
|
|
|
|
2020-11-22 22:18:37 +01:00
|
|
|
# copy freshly built LOKit and Collabora Online
|
2017-10-21 23:12:44 +02:00
|
|
|
COPY /instdir /
|
|
|
|
|
2021-11-18 13:08:14 +01:00
|
|
|
# copy the shell script which can start Collabora Online (coolwsd)
|
2020-11-22 22:18:37 +01:00
|
|
|
COPY /start-collabora-online.sh /
|
2017-10-21 23:12:44 +02:00
|
|
|
|
2020-10-02 10:53:04 +02:00
|
|
|
# set up Collabora Online (normally done by postinstall script of package)
|
2020-02-11 11:05:21 +01:00
|
|
|
# Fix permissions
|
2024-04-06 16:07:30 +02:00
|
|
|
RUN setcap cap_fowner,cap_chown,cap_sys_chroot=ep /usr/bin/coolforkit && \
|
2021-11-17 18:08:27 +01:00
|
|
|
setcap cap_sys_admin=ep /usr/bin/coolmount && \
|
2021-11-15 16:57:33 +01:00
|
|
|
adduser --quiet --system --group --home /opt/cool cool && \
|
2021-11-15 16:51:11 +01:00
|
|
|
rm -rf /opt/cool && \
|
|
|
|
mkdir -p /opt/cool/child-roots && \
|
2021-11-17 22:09:50 +01:00
|
|
|
coolwsd-systemplate-setup /opt/cool/systemplate /opt/lokit >/dev/null 2>&1 && \
|
2021-11-18 13:08:14 +01:00
|
|
|
touch /var/log/coolwsd.log && \
|
|
|
|
chown cool:cool /var/log/coolwsd.log && \
|
2021-11-15 17:04:57 +01:00
|
|
|
chown -R cool:cool /opt/ && \
|
2021-11-18 13:08:14 +01:00
|
|
|
chown -R cool:cool /etc/coolwsd
|
2020-02-11 11:05:21 +01:00
|
|
|
|
2020-02-11 10:32:47 +01:00
|
|
|
EXPOSE 9980
|
2020-02-11 11:05:21 +01:00
|
|
|
|
2021-11-15 17:04:57 +01:00
|
|
|
# switch to cool user (use numeric user id to be compatible with Kubernetes Pod Security Policies)
|
2020-02-11 11:05:21 +01:00
|
|
|
USER 101
|
|
|
|
|
2021-10-11 22:44:24 +02:00
|
|
|
CMD ["/start-collabora-online.sh"]
|