2017-10-21 16:12:44 -05: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/.
|
|
|
|
|
2020-05-08 05:34:48 -05:00
|
|
|
FROM debian:stable
|
2017-10-21 16:12:44 -05:00
|
|
|
|
2020-05-08 05:34:48 -05:00
|
|
|
# get the latest fixes
|
2017-10-21 16:12:44 -05:00
|
|
|
# install LibreOffice run-time dependencies
|
2018-12-08 09:08:03 -06:00
|
|
|
# install adduser, findutils, openssl and cpio that we need later
|
2018-11-16 04:18:29 -06:00
|
|
|
# install an editor
|
2020-10-02 03:53:04 -05:00
|
|
|
# tdf#117557 - Add CJK Fonts to Collabora Online Docker Image
|
2020-05-15 03:01:38 -05:00
|
|
|
RUN apt-get update && \
|
2020-05-28 06:23:56 -05:00
|
|
|
apt-get -y install libpng16-16 fontconfig adduser cpio \
|
2020-05-15 03:01:38 -05:00
|
|
|
findutils nano libpoco-dev libcap2-bin openssl inotify-tools \
|
|
|
|
procps libubsan0 libubsan1 openssh-client fonts-wqy-zenhei \
|
|
|
|
fonts-wqy-microhei fonts-droid-fallback fonts-noto-cjk
|
2018-05-11 06:15:40 -05:00
|
|
|
|
2020-10-02 03:53:04 -05:00
|
|
|
# copy freshly built LibreOffice master and Collabora Online master with latest translations
|
2017-10-21 16:12:44 -05:00
|
|
|
COPY /instdir /
|
|
|
|
|
2020-10-02 03:53:04 -05:00
|
|
|
# copy the shell script which can start Collabora Online (loolwsd)
|
2017-10-21 16:12:44 -05:00
|
|
|
COPY /scripts/run-lool.sh /
|
|
|
|
|
2020-10-02 03:53:04 -05:00
|
|
|
# set up Collabora Online (normally done by postinstall script of package)
|
2020-02-11 04:05:21 -06:00
|
|
|
# Fix permissions
|
2020-05-15 03:01:38 -05:00
|
|
|
RUN setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit && \
|
|
|
|
adduser --quiet --system --group --home /opt/lool lool && \
|
|
|
|
mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd && \
|
|
|
|
rm -rf /var/cache/loolwsd/* && \
|
|
|
|
rm -rf /opt/lool && \
|
|
|
|
mkdir -p /opt/lool/child-roots && \
|
|
|
|
loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1 && \
|
|
|
|
touch /var/log/loolwsd.log && \
|
|
|
|
chown lool:lool /var/log/loolwsd.log && \
|
|
|
|
chown -R lool:lool /opt/ && \
|
|
|
|
chown -R lool:lool /etc/loolwsd
|
2020-02-11 04:05:21 -06:00
|
|
|
|
2020-02-11 03:32:47 -06:00
|
|
|
EXPOSE 9980
|
2020-02-11 04:05:21 -06:00
|
|
|
|
|
|
|
# switch to lool user (use numeric user id to be compatible with Kubernetes Pod Security Policies)
|
|
|
|
USER 101
|
|
|
|
|
2017-10-21 16:12:44 -05:00
|
|
|
CMD bash /run-lool.sh
|