[Libreoffice-commits] online.git: docker/Debian docker/Ubuntu

Marco Marinello (via logerrit) logerrit at kemper.freedesktop.org
Wed May 20 06:35:21 UTC 2020


 docker/Debian |   33 ++++++++++++++++-----------------
 docker/Ubuntu |   35 +++++++++++++++++++----------------
 2 files changed, 35 insertions(+), 33 deletions(-)

New commits:
commit 16f72821bd7872497d132bd27a272218c753e0b6
Author:     Marco Marinello <marinello at libreoffice.org>
AuthorDate: Fri May 15 10:01:38 2020 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed May 20 08:35:03 2020 +0200

    Enhance docker build system: reduce created layers
    
    Signed-off-by: Marco Marinello <marinello at libreoffice.org>
    Change-Id: If12a84b3adb82dad3bf7ef7ea423e8bdfac1650e
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94261
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>

diff --git a/docker/Debian b/docker/Debian
index b43bc4a32..58cc72142 100644
--- a/docker/Debian
+++ b/docker/Debian
@@ -7,15 +7,15 @@
 FROM debian:stable
 
 # get the latest fixes
-RUN apt-get update
-
 # install LibreOffice run-time dependencies
 # install adduser, findutils, openssl and cpio that we need later
 # install an editor
-RUN apt-get -y install locales-all libpng16-16 fontconfig adduser cpio findutils nano libpoco-dev libcap2-bin openssl inotify-tools procps libubsan0 libubsan1 openssh-client
-
 # 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
+RUN apt-get update && \
+    apt-get -y install locales-all libpng16-16 fontconfig adduser cpio \
+               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
 
 # copy freshly built LibreOffice master and LibreOffice Online master with latest translations
 COPY /instdir /
@@ -24,18 +24,18 @@ COPY /instdir /
 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
-RUN loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1
-RUN touch /var/log/loolwsd.log
 # Fix permissions
-RUN chown lool:lool /var/log/loolwsd.log
-RUN chown -R lool:lool /opt/
-RUN chown -R lool:lool /etc/loolwsd
+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
 
 EXPOSE 9980
 
@@ -43,4 +43,3 @@ EXPOSE 9980
 USER 101
 
 CMD bash /run-lool.sh
-
diff --git a/docker/Ubuntu b/docker/Ubuntu
index 070826bf1..d0685b246 100644
--- a/docker/Ubuntu
+++ b/docker/Ubuntu
@@ -7,15 +7,18 @@
 FROM ubuntu:18.04
 
 # refresh repos otherwise installations later may fail
-RUN apt-get update
-
 # install LibreOffice run-time dependencies
 # install adduser, findutils, openssl and cpio that we need later
 # install an editor
-RUN apt-get -y install locales-all libpng16-16 fontconfig adduser cpio findutils nano libpocoxml50 libpocoutil50 libpoconetssl50 libpoconet50 libpocojson50 libpocofoundation50 libpococrypto50 libcap2-bin openssl openssh-client inotify-tools procps libxcb-shm0 libxcb-render0 libxrender1 libxext6
-
 # 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
+RUN apt-get update && \
+    apt-get -y install locales-all libpng16-16 fontconfig adduser cpio \
+               findutils nano libpocoxml50 libpocoutil50 libpoconetssl50 \
+               libpoconet50 libpocojson50 libpocofoundation50 libpococrypto50 \
+               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
 
 # copy freshly built LibreOffice master and LibreOffice Online master with latest translations
 COPY /instdir /
@@ -24,18 +27,18 @@ COPY /instdir /
 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
-RUN loolwsd-systemplate-setup /opt/lool/systemplate /opt/libreoffice >/dev/null 2>&1
-RUN touch /var/log/loolwsd.log
 # Fix permissions
-RUN chown lool:lool /var/log/loolwsd.log
-RUN chown -R lool:lool /opt/
-RUN chown -R lool:lool /etc/loolwsd
+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
 
 EXPOSE 9980
 


More information about the Libreoffice-commits mailing list