2017-10-21 16:12:44 -05:00
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# 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 02:39:27 -06:00
|
|
|
FROM ubuntu:18.04
|
2017-10-21 16:12:44 -05:00
|
|
|
|
2019-09-05 06:12:56 -05:00
|
|
|
# refresh repos otherwise installations later may fail
|
|
|
|
RUN apt-get update
|
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
|
2019-11-27 11:38:23 -06:00
|
|
|
RUN apt-get -y install locales-all libpng16-16 fontconfig adduser cpio findutils nano libpocoxml50 libpocoutil50 libpoconetssl50 libpoconet50 libpocojson50 libpocofoundation50 libpococrypto50 libcap2-bin openssl inotify-tools procps libxcb-shm0 libxcb-render0 libxrender1 libxext6
|
2017-10-21 16:12:44 -05:00
|
|
|
|
2018-05-11 06:15:40 -05:00
|
|
|
# tdf#117557 - Add CJK Fonts to LibreOffice Online Docker Image
|
|
|
|
RUN apt-get -y install fonts-wqy-zenhei fonts-wqy-microhei fonts-droid-fallback fonts-noto-cjk
|
|
|
|
|
2017-10-21 16:12:44 -05:00
|
|
|
# copy freshly built LibreOffice master and LibreOffice Online master with latest translations
|
|
|
|
COPY /instdir /
|
|
|
|
|
|
|
|
# copy the shell script which can start LibreOffice Online (loolwsd)
|
|
|
|
COPY /scripts/run-lool.sh /
|
|
|
|
|
|
|
|
# set up LibreOffice Online (normally done by postinstall script of package)
|
|
|
|
RUN setcap cap_fowner,cap_mknod,cap_sys_chroot=ep /usr/bin/loolforkit
|
|
|
|
RUN adduser --quiet --system --group --home /opt/lool lool
|
|
|
|
RUN mkdir -p /var/cache/loolwsd && chown lool: /var/cache/loolwsd
|
|
|
|
RUN rm -rf /var/cache/loolwsd/*
|
|
|
|
RUN rm -rf /opt/lool
|
|
|
|
RUN mkdir -p /opt/lool/child-roots
|
2019-02-05 13:55:57 -06:00
|
|
|
RUN loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1
|
2017-10-21 16:12:44 -05:00
|
|
|
RUN touch /var/log/loolwsd.log
|
2020-02-11 04:05:21 -06:00
|
|
|
# Fix permissions
|
|
|
|
RUN chown lool:lool /var/log/loolwsd.log
|
|
|
|
RUN chown -R lool:lool /opt/
|
|
|
|
RUN chown -R lool:lool /etc/loolwsd
|
|
|
|
|
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
|