[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH] automation: Use --no-install-recommends and -slim base for debian/unstable


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 3 Mar 2023 16:52:58 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Fri, 03 Mar 2023 16:53:41 +0000
  • Ironport-data: A9a23:BifYhKBc+rGlfxVW/zLjw5YqxClBgxIJ4kV8jS/XYbTApDx23jIAm jEfX2COP6nZZmfyKYt0PYznp00AuZXcyNdkQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nOHuGmYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFu8pvlDs15K6p4GhA5QRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw/8NeE19T/ vYheA8WcCmpgeC6/ai+Y7w57igjBJGD0II3v3hhyXfSDOo8QICFSKLPjTNa9G5u3IYUR6+YP pdHL2M1N3wsYDUWUrsTIJs4gOevgGi5azBCoUiZjaE2/3LS3Ep6172F3N/9I4TTGpQPwRvEz o7A102gXVIKFPHY8xuI+U32pMnBuHnAaZ1HQdVU8dY12QbOlwT/EiY+XlKhrf60okW3Qd5YJ gof/S9GhbMp6EWhQ935Xhu5iH2JpBgRX5xXCeJSwB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z WDDphV
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Use "--no-install-recommends" to avoid installing many packages that
aren't needed, many are *-doc packages. Also start using the -slim
base image as they remove a few unused files/directories, like docs/.

Explicitly install "ca-certificates" as it is only recommended for
"wget".
Explicitly install "ocaml-findlib" as it is only recommended for
"libfindlib-ocaml-dev".

Using "--no-install-recommends" saves about 600MB on the uncompress
image. 2.89GB vs 2.3GB (value from `docker image list`).

Switching to -slim save about 130MB.

Overwall, we go from 2.89GB to 2.17GB.

Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---

Notes:
    Change to use "-slim" was proposed by Andy. I went futher and added
    --no-install-recommends.
    
    I've tried to find other missing packages by looking at differences
    in  "tools/config.log", "stubdom/config.log", "config/", and
    "xen/.config".
    
    A test is in progress to check that no jobs are broken, but result
    probably not before next week.
        
https://gitlab.com/xen-project/people/anthonyper/xen/-/pipelines/795600920
    
    I've only tested gcc debug=n on x86_64 locally.

 automation/build/debian/unstable-i386.dockerfile | 6 ++++--
 automation/build/debian/unstable.dockerfile      | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/automation/build/debian/unstable-i386.dockerfile 
b/automation/build/debian/unstable-i386.dockerfile
index 1c4928b09e..cc116d32e9 100644
--- a/automation/build/debian/unstable-i386.dockerfile
+++ b/automation/build/debian/unstable-i386.dockerfile
@@ -1,4 +1,4 @@
-FROM i386/debian:unstable
+FROM i386/debian:unstable-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@xxxxxxxxxxxxxxxxxxxx"
 
@@ -12,7 +12,8 @@ ENTRYPOINT ["linux32"]
 
 # build depends
 RUN apt-get update && \
-    apt-get --quiet --yes install \
+    apt-get --quiet --no-install-recommends --yes install \
+        ca-certificates \
         build-essential \
         zlib1g-dev \
         libncurses5-dev \
@@ -35,6 +36,7 @@ RUN apt-get update && \
         libc6-dev \
         libnl-3-dev \
         ocaml-nox \
+        ocaml-findlib \
         libfindlib-ocaml-dev \
         markdown \
         transfig \
diff --git a/automation/build/debian/unstable.dockerfile 
b/automation/build/debian/unstable.dockerfile
index 6ef2878200..06ac909a85 100644
--- a/automation/build/debian/unstable.dockerfile
+++ b/automation/build/debian/unstable.dockerfile
@@ -1,4 +1,4 @@
-FROM debian:unstable
+FROM debian:unstable-slim
 LABEL maintainer.name="The Xen Project" \
       maintainer.email="xen-devel@xxxxxxxxxxxxxxxxxxxx"
 
@@ -10,7 +10,8 @@ WORKDIR /build
 
 # build depends
 RUN apt-get update && \
-    apt-get --quiet --yes install \
+    apt-get --quiet --no-install-recommends --yes install \
+        ca-certificates \
         build-essential \
         zlib1g-dev \
         libncurses5-dev \
@@ -34,6 +35,7 @@ RUN apt-get update && \
         libc6-dev-i386 \
         libnl-3-dev \
         ocaml-nox \
+        ocaml-findlib \
         libfindlib-ocaml-dev \
         markdown \
         transfig \
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.