public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
@ 2020-02-27 10:23 Ramotowski, Maciej
  2020-03-05 10:21 ` Arkadiusz Hiler
  0 siblings, 1 reply; 11+ messages in thread
From: Ramotowski, Maciej @ 2020-02-27 10:23 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org; +Cc: Ramotowski, Maciej, Latvala, Petri

Make Dockerfile's more universal.

Reduce size of Ubuntu based images by removing package lists.

Add support for building with build cache and without --squash flag:

 - Using apt-get update alone in a RUN statement causes caching issues
   and subsequent apt-get install instructions fail.

 - When you run an image and generate a container, you add a new
   writable layer (the “container layer”) on top of the underlying
   layers. All changes made to the running container, such as writing
   new files, modifying existing files, and deleting files, are written
   to this thin  writable container layer.

Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maciej Ramotowski <maciej.ramotowski@intel.com>
---
 Dockerfile.build-debian         | 39 +++++++---------
 Dockerfile.build-debian-arm64   | 68 ++++++++++++---------------
 Dockerfile.build-debian-armhf   | 67 ++++++++++++--------------
 Dockerfile.build-debian-minimal | 44 +++++++++--------
 Dockerfile.build-debian-mips    | 70 +++++++++++++--------------
 Dockerfile.build-fedora         | 83 ++++++++++++++++-----------------
 6 files changed, 172 insertions(+), 199 deletions(-)

diff --git a/Dockerfile.build-debian b/Dockerfile.build-debian
index b143a532..6cf7a1f0 100644
--- a/Dockerfile.build-debian
+++ b/Dockerfile.build-debian
@@ -7,25 +7,20 @@ FROM $CI_REGISTRY_IMAGE/build-debian-minimal:commit-$CI_COMMIT_SHA
 # just few extra dependencies for building IGT with all the optional components
 # enabled
 
-RUN apt-get update
-RUN apt-get install -y \
-			libunwind-dev \
-			libgsl-dev \
-			libasound2-dev \
-			libxmlrpc-core-c3-dev \
-			libjson-c-dev \
-			libcurl4-openssl-dev \
-			python-docutils \
-			valgrind \
-			peg \
-			libdrm-intel1
-
-# autotools build deps
-RUN apt-get install -y \
-			autoconf \
-			automake \
-			xutils-dev \
-			libtool \
-			make
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    autoconf \
+    automake \
+    libasound2-dev \
+    libcurl4-openssl-dev \
+    libdrm-intel1 \
+    libgsl-dev \
+    libjson-c-dev \
+    libtool \
+    libunwind-dev \
+    libxmlrpc-core-c3-dev \
+    make \
+    peg \
+    python-docutils \
+    valgrind \
+    xutils-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-arm64 b/Dockerfile.build-debian-arm64
index 573c7096..924432bd 100644
--- a/Dockerfile.build-debian-arm64
+++ b/Dockerfile.build-debian-arm64
@@ -1,40 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture arm64
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-aarch64-linux-gnu \
-			libatomic1:arm64 \
-			libpciaccess-dev:arm64 \
-			libkmod-dev:arm64 \
-			libprocps-dev:arm64 \
-			libunwind-dev:arm64 \
-			libdw-dev:arm64 \
-			zlib1g-dev:arm64 \
-			liblzma-dev:arm64 \
-			libcairo-dev:arm64 \
-			libpixman-1-dev:arm64 \
-			libudev-dev:arm64 \
-			libgsl-dev:arm64 \
-			libasound2-dev:arm64 \
-			libjson-c-dev:arm64 \
-			libcurl4-openssl-dev:arm64 \
-			libxrandr-dev:arm64 \
-			libxv-dev:arm64 \
-			meson \
-			libdrm-dev:arm64 \
-			qemu-user \
-			qemu-user-static
-
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-aarch64-linux-gnu \
+    libasound2-dev:arm64 \
+    libatomic1:arm64 \
+    libcairo-dev:arm64 \
+    libcurl4-openssl-dev:arm64 \
+    libdrm-dev:arm64 \
+    libdw-dev:arm64 \
+    libgsl-dev:arm64 \
+    libjson-c-dev:arm64 \
+    libkmod-dev:arm64 \
+    liblzma-dev:arm64 \
+    libpciaccess-dev:arm64 \
+    libpixman-1-dev:arm64 \
+    libprocps-dev:arm64 \
+    libudev-dev:arm64 \
+    libunwind-dev:arm64 \
+    libxrandr-dev:arm64 \
+    libxv-dev:arm64 \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:arm64 \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-armhf b/Dockerfile.build-debian-armhf
index 737ca364..3752dc91 100644
--- a/Dockerfile.build-debian-armhf
+++ b/Dockerfile.build-debian-armhf
@@ -1,39 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture armhf
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-arm-linux-gnueabihf \
-			libatomic1:armhf \
-			libpciaccess-dev:armhf \
-			libkmod-dev:armhf \
-			libprocps-dev:armhf \
-			libunwind-dev:armhf \
-			libdw-dev:armhf \
-			zlib1g-dev:armhf \
-			liblzma-dev:armhf \
-			libcairo-dev:armhf \
-			libpixman-1-dev:armhf \
-			libudev-dev:armhf \
-			libgsl-dev:armhf \
-			libasound2-dev:armhf \
-			libjson-c-dev:armhf \
-			libcurl4-openssl-dev:armhf \
-			libxrandr-dev:armhf \
-			libxv-dev:armhf \
-			meson \
-			libdrm-dev:armhf \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-arm-linux-gnueabihf \
+    libasound2-dev:armhf \
+    libatomic1:armhf \
+    libcairo-dev:armhf \
+    libcurl4-openssl-dev:armhf \
+    libdrm-dev:armhf \
+    libdw-dev:armhf \
+    libgsl-dev:armhf \
+    libjson-c-dev:armhf \
+    libkmod-dev:armhf \
+    liblzma-dev:armhf \
+    libpciaccess-dev:armhf \
+    libpixman-1-dev:armhf \
+    libprocps-dev:armhf \
+    libudev-dev:armhf \
+    libunwind-dev:armhf \
+    libxrandr-dev:armhf \
+    libxv-dev:armhf \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:armhf \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-minimal b/Dockerfile.build-debian-minimal
index 64edf4b4..d0756be5 100644
--- a/Dockerfile.build-debian-minimal
+++ b/Dockerfile.build-debian-minimal
@@ -1,25 +1,23 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			gcc \
-			flex \
-			bison \
-			pkg-config \
-			libatomic1 \
-			libpciaccess-dev \
-			libkmod-dev \
-			libprocps-dev \
-			libdw-dev \
-			zlib1g-dev \
-			liblzma-dev \
-			libcairo-dev \
-			libpixman-1-dev \
-			libudev-dev \
-			libxrandr-dev \
-			libxv-dev \
-			x11proto-dri2-dev \
-			meson \
-			libdrm-dev
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc \
+    libatomic1 \
+    libcairo-dev \
+    libdrm-dev \
+    libdw-dev \
+    libkmod-dev \
+    liblzma-dev \
+    libpciaccess-dev \
+    libpixman-1-dev \
+    libprocps-dev \
+    libudev-dev \
+    libxrandr-dev \
+    libxv-dev \
+    meson \
+    pkg-config \
+    x11proto-dri2-dev \
+    zlib1g-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-mips b/Dockerfile.build-debian-mips
index 7e4bacdf..e52d403b 100644
--- a/Dockerfile.build-debian-mips
+++ b/Dockerfile.build-debian-mips
@@ -2,42 +2,36 @@
 # https://bugs.debian.org/932725
 FROM debian:stretch-backports
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture mips
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-mips-linux-gnu \
-			libatomic1:mips \
-			libpciaccess-dev:mips \
-			libkmod-dev:mips \
-			libprocps-dev:mips \
-			libunwind-dev:mips \
-			libdw-dev:mips \
-			zlib1g-dev:mips \
-			liblzma-dev:mips \
-			libcairo-dev:mips \
-			libpixman-1-dev:mips \
-			libudev-dev:mips \
-			libgsl-dev:mips \
-			libasound2-dev:mips \
-			libjson-c-dev:mips \
-			libcurl4-openssl-dev:mips \
-			libxrandr-dev:mips \
-			libxv-dev:mips
-
-RUN apt-get install -t stretch-backports -y \
-			meson \
-			libdrm-dev:mips \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-mips-linux-gnu \
+    libasound2-dev:mips \
+    libatomic1:mips \
+    libcairo-dev:mips \
+    libcurl4-openssl-dev:mips \
+    libdw-dev:mips \
+    libgsl-dev:mips \
+    libjson-c-dev:mips \
+    libkmod-dev:mips \
+    liblzma-dev:mips \
+    libpciaccess-dev:mips \
+    libpixman-1-dev:mips \
+    libprocps-dev:mips \
+    libudev-dev:mips \
+    libunwind-dev:mips \
+    libxrandr-dev:mips \
+    libxv-dev:mips \
+    peg \
+    pkg-config \
+    python-docutils \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:mips \
+ && apt-get install -t stretch-backports -y \
+    libdrm-dev:mips \
+    meson \
+    qemu-user \
+    qemu-user-static \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-fedora b/Dockerfile.build-fedora
index dc5d1b16..34fff96b 100644
--- a/Dockerfile.build-fedora
+++ b/Dockerfile.build-fedora
@@ -1,50 +1,47 @@
 FROM fedora:31
 
 RUN dnf install -y \
-	gcc flex bison libatomic meson ninja-build xdotool \
-	'pkgconfig(libdrm)' \
-	'pkgconfig(pciaccess)' \
-	'pkgconfig(libkmod)' \
-	'pkgconfig(libprocps)' \
-	'pkgconfig(libunwind)' \
-	'pkgconfig(libdw)' \
-	'pkgconfig(pixman-1)' \
-	'pkgconfig(valgrind)' \
-	'pkgconfig(cairo)' \
-	'pkgconfig(libudev)' \
-	'pkgconfig(glib-2.0)' \
-	'pkgconfig(gsl)' \
-	'pkgconfig(alsa)' \
-	'pkgconfig(xmlrpc)' \
-	'pkgconfig(xmlrpc_util)' \
-	'pkgconfig(xmlrpc_client)' \
-	'pkgconfig(json-c)' \
-	'pkgconfig(gtk-doc)' \
-	'pkgconfig(xv)' \
-	'pkgconfig(xrandr)' \
-	python3-docutils
-
-# We need peg to build overlay
-RUN dnf install -y make
-RUN mkdir /tmp/peg
+    'pkgconfig(alsa)' \
+    'pkgconfig(cairo)' \
+    'pkgconfig(glib-2.0)' \
+    'pkgconfig(gsl)' \
+    'pkgconfig(gtk-doc)' \
+    'pkgconfig(json-c)' \
+    'pkgconfig(libdrm)' \
+    'pkgconfig(libdw)' \
+    'pkgconfig(libkmod)' \
+    'pkgconfig(libprocps)' \
+    'pkgconfig(libudev)' \
+    'pkgconfig(libunwind)' \
+    'pkgconfig(pciaccess)' \
+    'pkgconfig(pixman-1)' \
+    'pkgconfig(valgrind)' \
+    'pkgconfig(xmlrpc)' \
+    'pkgconfig(xmlrpc_client)' \
+    'pkgconfig(xmlrpc_util)' \
+    'pkgconfig(xrandr)' \
+    'pkgconfig(xv)' \
+    bison \
+    clang \
+    diffutils \
+    findutils \
+    flex \
+    gcc \
+    libatomic \
+    make \
+    meson \
+    ninja-build \
+    python3-docutils \
+    python3-pip \
+    xdotool \
+ && dnf clean all
 
 # originaly from http://piumarta.com/software/peg/
-RUN curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}"
-RUN tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz
-RUN make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install
-RUN rm -fr /tmp/peg
-
-# For compile-testing on clang
-RUN dnf install -y clang
-
-# For test list comparison
-RUN dnf install -y diffutils
+RUN mkdir /tmp/peg \
+ && curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}" \
+ && tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz \
+ && ls /tmp/peg \
+ && make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install \
+ && rm -fr /tmp/peg
 
-# For the helpers for the container with IGT inside
-RUN dnf install -y findutils
-
-# Meson version switching shenanigans
-RUN dnf install -y python3-pip
 RUN curl -o "/usr/src/#1" "https://files.pythonhosted.org/packages/e8/ec/3e6a68c9e0fd4b4f4fb6877a3ccfb6f6e6d09f2b4fc87674e671bf64b7b8/{meson-0.47.2.tar.gz}"
-
-RUN dnf clean all
-- 
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-02-27 10:23 Ramotowski, Maciej
@ 2020-03-05 10:21 ` Arkadiusz Hiler
  0 siblings, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-03-05 10:21 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev@lists.freedesktop.org, Latvala, Petri

On Thu, Feb 27, 2020 at 12:23:35PM +0200, Ramotowski, Maciej wrote:
> Make Dockerfile's more universal.
> 
> Reduce size of Ubuntu based images by removing package lists.
> 
> Add support for building with build cache and without --squash flag:
> 
>  - Using apt-get update alone in a RUN statement causes caching issues
>    and subsequent apt-get install instructions fail.
> 
>  - When you run an image and generate a container, you add a new
>    writable layer (the “container layer”) on top of the underlying
>    layers. All changes made to the running container, such as writing
>    new files, modifying existing files, and deleting files, are written
>    to this thin  writable container layer.
> 
> Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Maciej Ramotowski <maciej.ramotowski@intel.com>

Looks sensible. Thanks!

The patch does not apply though:
https://patchwork.freedesktop.org/series/74003/

Can you rebase it?

For some reason Fi.CI.BUILD had sending out the results disabled in
patchwork. I have now enabled it.

-- 
Cheers,
Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
@ 2020-03-05 10:55 Ramotowski, Maciej
  2020-03-05 11:23 ` [igt-dev] ✗ Fi.CI.BUILD: failure for .gitlab-ci: Reduce Docker images size (rev2) Patchwork
  2020-03-05 12:10 ` [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Petri Latvala
  0 siblings, 2 replies; 11+ messages in thread
From: Ramotowski, Maciej @ 2020-03-05 10:55 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org; +Cc: Ramotowski, Maciej, Latvala, Petri

Make Dockerfile's more universal.

Reduce size of Ubuntu based images by removing package lists.

Add support for building with build cache and without --squash flag:

 - Using apt-get update alone in a RUN statement causes caching issues
   and subsequent apt-get install instructions fail.

 - When you run an image and generate a container, you add a new
   writable layer (the “container layer”) on top of the underlying
   layers. All changes made to the running container, such as writing
   new files, modifying existing files, and deleting files, are written
   to this thin  writable container layer.

Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maciej Ramotowski <maciej.ramotowski@intel.com>
---
 Dockerfile.build-debian         | 39 +++++++---------
 Dockerfile.build-debian-arm64   | 68 ++++++++++++---------------
 Dockerfile.build-debian-armhf   | 67 ++++++++++++--------------
 Dockerfile.build-debian-minimal | 44 +++++++++--------
 Dockerfile.build-debian-mips    | 70 +++++++++++++--------------
 Dockerfile.build-fedora         | 83 ++++++++++++++++-----------------
 6 files changed, 172 insertions(+), 199 deletions(-)

diff --git a/Dockerfile.build-debian b/Dockerfile.build-debian
index b143a532..6cf7a1f0 100644
--- a/Dockerfile.build-debian
+++ b/Dockerfile.build-debian
@@ -7,25 +7,20 @@ FROM $CI_REGISTRY_IMAGE/build-debian-minimal:commit-$CI_COMMIT_SHA
 # just few extra dependencies for building IGT with all the optional components
 # enabled
 
-RUN apt-get update
-RUN apt-get install -y \
-			libunwind-dev \
-			libgsl-dev \
-			libasound2-dev \
-			libxmlrpc-core-c3-dev \
-			libjson-c-dev \
-			libcurl4-openssl-dev \
-			python-docutils \
-			valgrind \
-			peg \
-			libdrm-intel1
-
-# autotools build deps
-RUN apt-get install -y \
-			autoconf \
-			automake \
-			xutils-dev \
-			libtool \
-			make
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    autoconf \
+    automake \
+    libasound2-dev \
+    libcurl4-openssl-dev \
+    libdrm-intel1 \
+    libgsl-dev \
+    libjson-c-dev \
+    libtool \
+    libunwind-dev \
+    libxmlrpc-core-c3-dev \
+    make \
+    peg \
+    python-docutils \
+    valgrind \
+    xutils-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-arm64 b/Dockerfile.build-debian-arm64
index 573c7096..924432bd 100644
--- a/Dockerfile.build-debian-arm64
+++ b/Dockerfile.build-debian-arm64
@@ -1,40 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture arm64
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-aarch64-linux-gnu \
-			libatomic1:arm64 \
-			libpciaccess-dev:arm64 \
-			libkmod-dev:arm64 \
-			libprocps-dev:arm64 \
-			libunwind-dev:arm64 \
-			libdw-dev:arm64 \
-			zlib1g-dev:arm64 \
-			liblzma-dev:arm64 \
-			libcairo-dev:arm64 \
-			libpixman-1-dev:arm64 \
-			libudev-dev:arm64 \
-			libgsl-dev:arm64 \
-			libasound2-dev:arm64 \
-			libjson-c-dev:arm64 \
-			libcurl4-openssl-dev:arm64 \
-			libxrandr-dev:arm64 \
-			libxv-dev:arm64 \
-			meson \
-			libdrm-dev:arm64 \
-			qemu-user \
-			qemu-user-static
-
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-aarch64-linux-gnu \
+    libasound2-dev:arm64 \
+    libatomic1:arm64 \
+    libcairo-dev:arm64 \
+    libcurl4-openssl-dev:arm64 \
+    libdrm-dev:arm64 \
+    libdw-dev:arm64 \
+    libgsl-dev:arm64 \
+    libjson-c-dev:arm64 \
+    libkmod-dev:arm64 \
+    liblzma-dev:arm64 \
+    libpciaccess-dev:arm64 \
+    libpixman-1-dev:arm64 \
+    libprocps-dev:arm64 \
+    libudev-dev:arm64 \
+    libunwind-dev:arm64 \
+    libxrandr-dev:arm64 \
+    libxv-dev:arm64 \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:arm64 \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-armhf b/Dockerfile.build-debian-armhf
index 737ca364..3752dc91 100644
--- a/Dockerfile.build-debian-armhf
+++ b/Dockerfile.build-debian-armhf
@@ -1,39 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture armhf
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-arm-linux-gnueabihf \
-			libatomic1:armhf \
-			libpciaccess-dev:armhf \
-			libkmod-dev:armhf \
-			libprocps-dev:armhf \
-			libunwind-dev:armhf \
-			libdw-dev:armhf \
-			zlib1g-dev:armhf \
-			liblzma-dev:armhf \
-			libcairo-dev:armhf \
-			libpixman-1-dev:armhf \
-			libudev-dev:armhf \
-			libgsl-dev:armhf \
-			libasound2-dev:armhf \
-			libjson-c-dev:armhf \
-			libcurl4-openssl-dev:armhf \
-			libxrandr-dev:armhf \
-			libxv-dev:armhf \
-			meson \
-			libdrm-dev:armhf \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-arm-linux-gnueabihf \
+    libasound2-dev:armhf \
+    libatomic1:armhf \
+    libcairo-dev:armhf \
+    libcurl4-openssl-dev:armhf \
+    libdrm-dev:armhf \
+    libdw-dev:armhf \
+    libgsl-dev:armhf \
+    libjson-c-dev:armhf \
+    libkmod-dev:armhf \
+    liblzma-dev:armhf \
+    libpciaccess-dev:armhf \
+    libpixman-1-dev:armhf \
+    libprocps-dev:armhf \
+    libudev-dev:armhf \
+    libunwind-dev:armhf \
+    libxrandr-dev:armhf \
+    libxv-dev:armhf \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:armhf \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-minimal b/Dockerfile.build-debian-minimal
index 64edf4b4..d0756be5 100644
--- a/Dockerfile.build-debian-minimal
+++ b/Dockerfile.build-debian-minimal
@@ -1,25 +1,23 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			gcc \
-			flex \
-			bison \
-			pkg-config \
-			libatomic1 \
-			libpciaccess-dev \
-			libkmod-dev \
-			libprocps-dev \
-			libdw-dev \
-			zlib1g-dev \
-			liblzma-dev \
-			libcairo-dev \
-			libpixman-1-dev \
-			libudev-dev \
-			libxrandr-dev \
-			libxv-dev \
-			x11proto-dri2-dev \
-			meson \
-			libdrm-dev
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc \
+    libatomic1 \
+    libcairo-dev \
+    libdrm-dev \
+    libdw-dev \
+    libkmod-dev \
+    liblzma-dev \
+    libpciaccess-dev \
+    libpixman-1-dev \
+    libprocps-dev \
+    libudev-dev \
+    libxrandr-dev \
+    libxv-dev \
+    meson \
+    pkg-config \
+    x11proto-dri2-dev \
+    zlib1g-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-mips b/Dockerfile.build-debian-mips
index 7e4bacdf..e52d403b 100644
--- a/Dockerfile.build-debian-mips
+++ b/Dockerfile.build-debian-mips
@@ -2,42 +2,36 @@
 # https://bugs.debian.org/932725
 FROM debian:stretch-backports
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture mips
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-mips-linux-gnu \
-			libatomic1:mips \
-			libpciaccess-dev:mips \
-			libkmod-dev:mips \
-			libprocps-dev:mips \
-			libunwind-dev:mips \
-			libdw-dev:mips \
-			zlib1g-dev:mips \
-			liblzma-dev:mips \
-			libcairo-dev:mips \
-			libpixman-1-dev:mips \
-			libudev-dev:mips \
-			libgsl-dev:mips \
-			libasound2-dev:mips \
-			libjson-c-dev:mips \
-			libcurl4-openssl-dev:mips \
-			libxrandr-dev:mips \
-			libxv-dev:mips
-
-RUN apt-get install -t stretch-backports -y \
-			meson \
-			libdrm-dev:mips \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-mips-linux-gnu \
+    libasound2-dev:mips \
+    libatomic1:mips \
+    libcairo-dev:mips \
+    libcurl4-openssl-dev:mips \
+    libdw-dev:mips \
+    libgsl-dev:mips \
+    libjson-c-dev:mips \
+    libkmod-dev:mips \
+    liblzma-dev:mips \
+    libpciaccess-dev:mips \
+    libpixman-1-dev:mips \
+    libprocps-dev:mips \
+    libudev-dev:mips \
+    libunwind-dev:mips \
+    libxrandr-dev:mips \
+    libxv-dev:mips \
+    peg \
+    pkg-config \
+    python-docutils \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:mips \
+ && apt-get install -t stretch-backports -y \
+    libdrm-dev:mips \
+    meson \
+    qemu-user \
+    qemu-user-static \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-fedora b/Dockerfile.build-fedora
index dc5d1b16..34fff96b 100644
--- a/Dockerfile.build-fedora
+++ b/Dockerfile.build-fedora
@@ -1,50 +1,47 @@
 FROM fedora:31
 
 RUN dnf install -y \
-	gcc flex bison libatomic meson ninja-build xdotool \
-	'pkgconfig(libdrm)' \
-	'pkgconfig(pciaccess)' \
-	'pkgconfig(libkmod)' \
-	'pkgconfig(libprocps)' \
-	'pkgconfig(libunwind)' \
-	'pkgconfig(libdw)' \
-	'pkgconfig(pixman-1)' \
-	'pkgconfig(valgrind)' \
-	'pkgconfig(cairo)' \
-	'pkgconfig(libudev)' \
-	'pkgconfig(glib-2.0)' \
-	'pkgconfig(gsl)' \
-	'pkgconfig(alsa)' \
-	'pkgconfig(xmlrpc)' \
-	'pkgconfig(xmlrpc_util)' \
-	'pkgconfig(xmlrpc_client)' \
-	'pkgconfig(json-c)' \
-	'pkgconfig(gtk-doc)' \
-	'pkgconfig(xv)' \
-	'pkgconfig(xrandr)' \
-	python3-docutils
-
-# We need peg to build overlay
-RUN dnf install -y make
-RUN mkdir /tmp/peg
+    'pkgconfig(alsa)' \
+    'pkgconfig(cairo)' \
+    'pkgconfig(glib-2.0)' \
+    'pkgconfig(gsl)' \
+    'pkgconfig(gtk-doc)' \
+    'pkgconfig(json-c)' \
+    'pkgconfig(libdrm)' \
+    'pkgconfig(libdw)' \
+    'pkgconfig(libkmod)' \
+    'pkgconfig(libprocps)' \
+    'pkgconfig(libudev)' \
+    'pkgconfig(libunwind)' \
+    'pkgconfig(pciaccess)' \
+    'pkgconfig(pixman-1)' \
+    'pkgconfig(valgrind)' \
+    'pkgconfig(xmlrpc)' \
+    'pkgconfig(xmlrpc_client)' \
+    'pkgconfig(xmlrpc_util)' \
+    'pkgconfig(xrandr)' \
+    'pkgconfig(xv)' \
+    bison \
+    clang \
+    diffutils \
+    findutils \
+    flex \
+    gcc \
+    libatomic \
+    make \
+    meson \
+    ninja-build \
+    python3-docutils \
+    python3-pip \
+    xdotool \
+ && dnf clean all
 
 # originaly from http://piumarta.com/software/peg/
-RUN curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}"
-RUN tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz
-RUN make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install
-RUN rm -fr /tmp/peg
-
-# For compile-testing on clang
-RUN dnf install -y clang
-
-# For test list comparison
-RUN dnf install -y diffutils
+RUN mkdir /tmp/peg \
+ && curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}" \
+ && tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz \
+ && ls /tmp/peg \
+ && make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install \
+ && rm -fr /tmp/peg
 
-# For the helpers for the container with IGT inside
-RUN dnf install -y findutils
-
-# Meson version switching shenanigans
-RUN dnf install -y python3-pip
 RUN curl -o "/usr/src/#1" "https://files.pythonhosted.org/packages/e8/ec/3e6a68c9e0fd4b4f4fb6877a3ccfb6f6e6d09f2b4fc87674e671bf64b7b8/{meson-0.47.2.tar.gz}"
-
-RUN dnf clean all
-- 
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [igt-dev] ✗ Fi.CI.BUILD: failure for .gitlab-ci: Reduce Docker images size (rev2)
  2020-03-05 10:55 [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Ramotowski, Maciej
@ 2020-03-05 11:23 ` Patchwork
  2020-03-05 12:10 ` [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Petri Latvala
  1 sibling, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-03-05 11:23 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev

== Series Details ==

Series: .gitlab-ci: Reduce Docker images size (rev2)
URL   : https://patchwork.freedesktop.org/series/74003/
State : failure

== Summary ==

Applying: .gitlab-ci: Reduce Docker images size
Using index info to reconstruct a base tree...
Patch failed at 0001 .gitlab-ci: Reduce Docker images size
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 10:55 [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Ramotowski, Maciej
  2020-03-05 11:23 ` [igt-dev] ✗ Fi.CI.BUILD: failure for .gitlab-ci: Reduce Docker images size (rev2) Patchwork
@ 2020-03-05 12:10 ` Petri Latvala
  2020-03-05 13:39   ` Ramotowski, Maciej
  1 sibling, 1 reply; 11+ messages in thread
From: Petri Latvala @ 2020-03-05 12:10 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev@lists.freedesktop.org

In your mail header:
Content-Transfer-Encoding: base64


That's why it doesn't apply in CI, and git am here too cannot cope
with the encoding. Did you use git send-email to send the patch? If
not, please do.


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 12:10 ` [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Petri Latvala
@ 2020-03-05 13:39   ` Ramotowski, Maciej
  2020-03-05 13:43     ` Petri Latvala
  2020-03-05 13:48     ` Arkadiusz Hiler
  0 siblings, 2 replies; 11+ messages in thread
From: Ramotowski, Maciej @ 2020-03-05 13:39 UTC (permalink / raw)
  To: Latvala, Petri; +Cc: igt-dev@lists.freedesktop.org

Yes I did use git send-email I did pre-check with --dry-run option it shows 8bit for encoding. Should I try to resend it?

-----Original Message-----
From: Latvala, Petri 
Sent: Thursday, March 5, 2020 1:11 PM
To: Ramotowski, Maciej <maciej.ramotowski@intel.com>
Cc: igt-dev@lists.freedesktop.org; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
Subject: Re: [PATCH] .gitlab-ci: Reduce Docker images size

In your mail header:
Content-Transfer-Encoding: base64


That's why it doesn't apply in CI, and git am here too cannot cope with the encoding. Did you use git send-email to send the patch? If not, please do.


--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 13:39   ` Ramotowski, Maciej
@ 2020-03-05 13:43     ` Petri Latvala
  2020-03-05 13:48     ` Arkadiusz Hiler
  1 sibling, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2020-03-05 13:43 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev@lists.freedesktop.org

On Thu, Mar 05, 2020 at 03:39:22PM +0200, Ramotowski, Maciej wrote:
> Yes I did use git send-email I did pre-check with --dry-run option it shows 8bit for encoding. Should I try to resend it?

Please do, but recreate the patch after

 git config --local format.subjectPrefix "PATCH i-g-t"

and send test mails to intel-gfx-trybot@lists.freedesktop.org


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 13:39   ` Ramotowski, Maciej
  2020-03-05 13:43     ` Petri Latvala
@ 2020-03-05 13:48     ` Arkadiusz Hiler
  2020-03-05 13:57       ` Petri Latvala
  2020-03-05 14:00       ` Arkadiusz Hiler
  1 sibling, 2 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-03-05 13:48 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev@lists.freedesktop.org, Latvala, Petri

On Thu, Mar 05, 2020 at 03:39:22PM +0200, Ramotowski, Maciej wrote:
> Yes I did use git send-email I did pre-check with --dry-run option it shows 8bit for encoding. Should I try to resend it?
> 
> -----Original Message-----
> From: Latvala, Petri 
> Sent: Thursday, March 5, 2020 1:11 PM
> To: Ramotowski, Maciej <maciej.ramotowski@intel.com>
> Cc: igt-dev@lists.freedesktop.org; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> Subject: Re: [PATCH] .gitlab-ci: Reduce Docker images size
> 
> In your mail header:
> Content-Transfer-Encoding: base64
> 
> 
> That's why it doesn't apply in CI, and git am here too cannot cope with the encoding. Did you use git send-email to send the patch? If not, please do.

% wget https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/ -O m.patch
--2020-03-05 15:42:17--  https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/
Resolving patchwork.freedesktop.org (patchwork.freedesktop.org)... 131.252.210.167, 2610:10:20:722:a800:ff:feee:56cf
Connecting to patchwork.freedesktop.org (patchwork.freedesktop.org)|131.252.210.167|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 16478 (16K) [text/plain]
Saving to: ‘m.patch’

m.patch                                              100%[======================================================================================================================>]  16.09K  80.8KB/s    in 0.2s

2020-03-05 15:42:19 (80.8 KB/s) - ‘m.patch’ saved [16478/16478]

% git am m.patch
Applying: .gitlab-ci: Reduce Docker images size
error: patch failed: Dockerfile.build-debian:7
error: Dockerfile.build-debian: patch does not apply
error: patch failed: Dockerfile.build-debian-arm64:1
error: Dockerfile.build-debian-arm64: patch does not apply
error: patch failed: Dockerfile.build-debian-armhf:1
error: Dockerfile.build-debian-armhf: patch does not apply
error: patch failed: Dockerfile.build-debian-minimal:1
error: Dockerfile.build-debian-minimal: patch does not apply
error: patch failed: Dockerfile.build-debian-mips:2
error: Dockerfile.build-debian-mips: patch does not apply
error: patch failed: Dockerfile.build-fedora:1
error: Dockerfile.build-fedora: patch does not apply
Patch failed at 0001 .gitlab-ci: Reduce Docker images size
hint: Use 'git am --show-current-patch' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

So it's not base64. Let me see what actually goes wrong. You can get the
unencoded patch here: https://patchwork.freedesktop.org/patch/356524/raw/

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 13:48     ` Arkadiusz Hiler
@ 2020-03-05 13:57       ` Petri Latvala
  2020-03-05 14:00       ` Arkadiusz Hiler
  1 sibling, 0 replies; 11+ messages in thread
From: Petri Latvala @ 2020-03-05 13:57 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: igt-dev@lists.freedesktop.org, Ramotowski, Maciej

On Thu, Mar 05, 2020 at 03:48:03PM +0200, Arkadiusz Hiler wrote:
> On Thu, Mar 05, 2020 at 03:39:22PM +0200, Ramotowski, Maciej wrote:
> > Yes I did use git send-email I did pre-check with --dry-run option it shows 8bit for encoding. Should I try to resend it?
> > 
> > -----Original Message-----
> > From: Latvala, Petri 
> > Sent: Thursday, March 5, 2020 1:11 PM
> > To: Ramotowski, Maciej <maciej.ramotowski@intel.com>
> > Cc: igt-dev@lists.freedesktop.org; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> > Subject: Re: [PATCH] .gitlab-ci: Reduce Docker images size
> > 
> > In your mail header:
> > Content-Transfer-Encoding: base64
> > 
> > 
> > That's why it doesn't apply in CI, and git am here too cannot cope with the encoding. Did you use git send-email to send the patch? If not, please do.
> 
> % wget https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/ -O m.patch
> --2020-03-05 15:42:17--  https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/
> Resolving patchwork.freedesktop.org (patchwork.freedesktop.org)... 131.252.210.167, 2610:10:20:722:a800:ff:feee:56cf
> Connecting to patchwork.freedesktop.org (patchwork.freedesktop.org)|131.252.210.167|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 16478 (16K) [text/plain]
> Saving to: ‘m.patch’
> 
> m.patch                                              100%[======================================================================================================================>]  16.09K  80.8KB/s    in 0.2s
> 
> 2020-03-05 15:42:19 (80.8 KB/s) - ‘m.patch’ saved [16478/16478]
> 
> % git am m.patch
> Applying: .gitlab-ci: Reduce Docker images size
> error: patch failed: Dockerfile.build-debian:7
> error: Dockerfile.build-debian: patch does not apply
> error: patch failed: Dockerfile.build-debian-arm64:1
> error: Dockerfile.build-debian-arm64: patch does not apply
> error: patch failed: Dockerfile.build-debian-armhf:1
> error: Dockerfile.build-debian-armhf: patch does not apply
> error: patch failed: Dockerfile.build-debian-minimal:1
> error: Dockerfile.build-debian-minimal: patch does not apply
> error: patch failed: Dockerfile.build-debian-mips:2
> error: Dockerfile.build-debian-mips: patch does not apply
> error: patch failed: Dockerfile.build-fedora:1
> error: Dockerfile.build-fedora: patch does not apply
> Patch failed at 0001 .gitlab-ci: Reduce Docker images size
> hint: Use 'git am --show-current-patch' to see the failed patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> 
> So it's not base64.

Yep, my bad.


> Let me see what actually goes wrong. You can get the
> unencoded patch here: https://patchwork.freedesktop.org/patch/356524/raw/


(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-debian
(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-debian-arm64
(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-debian-armhf
(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-debian-minimal
(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-debian-mips
(Stripping trailing CRs from patch; use --binary to disable.)
patching file Dockerfile.build-fedora


Good old \r\n, eh?


-- 
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
  2020-03-05 13:48     ` Arkadiusz Hiler
  2020-03-05 13:57       ` Petri Latvala
@ 2020-03-05 14:00       ` Arkadiusz Hiler
  1 sibling, 0 replies; 11+ messages in thread
From: Arkadiusz Hiler @ 2020-03-05 14:00 UTC (permalink / raw)
  To: Ramotowski, Maciej; +Cc: igt-dev@lists.freedesktop.org, Latvala, Petri

On Thu, Mar 05, 2020 at 03:48:06PM +0200, Arkadiusz Hiler wrote:
> On Thu, Mar 05, 2020 at 03:39:22PM +0200, Ramotowski, Maciej wrote:
> > Yes I did use git send-email I did pre-check with --dry-run option it shows 8bit for encoding. Should I try to resend it?
> > 
> > -----Original Message-----
> > From: Latvala, Petri 
> > Sent: Thursday, March 5, 2020 1:11 PM
> > To: Ramotowski, Maciej <maciej.ramotowski@intel.com>
> > Cc: igt-dev@lists.freedesktop.org; Hiler, Arkadiusz <arkadiusz.hiler@intel.com>
> > Subject: Re: [PATCH] .gitlab-ci: Reduce Docker images size
> > 
> > In your mail header:
> > Content-Transfer-Encoding: base64
> > 
> > 
> > That's why it doesn't apply in CI, and git am here too cannot cope with the encoding. Did you use git send-email to send the patch? If not, please do.
> 
> % wget https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/ -O m.patch
> --2020-03-05 15:42:17--  https://patchwork.freedesktop.org/api/1.0/series/74003/revisions/2/mbox/
> Resolving patchwork.freedesktop.org (patchwork.freedesktop.org)... 131.252.210.167, 2610:10:20:722:a800:ff:feee:56cf
> Connecting to patchwork.freedesktop.org (patchwork.freedesktop.org)|131.252.210.167|:443... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 16478 (16K) [text/plain]
> Saving to: ‘m.patch’
> 
> m.patch                                              100%[======================================================================================================================>]  16.09K  80.8KB/s    in 0.2s
> 
> 2020-03-05 15:42:19 (80.8 KB/s) - ‘m.patch’ saved [16478/16478]
> 
> % git am m.patch
> Applying: .gitlab-ci: Reduce Docker images size
> error: patch failed: Dockerfile.build-debian:7
> error: Dockerfile.build-debian: patch does not apply
> error: patch failed: Dockerfile.build-debian-arm64:1
> error: Dockerfile.build-debian-arm64: patch does not apply
> error: patch failed: Dockerfile.build-debian-armhf:1
> error: Dockerfile.build-debian-armhf: patch does not apply
> error: patch failed: Dockerfile.build-debian-minimal:1
> error: Dockerfile.build-debian-minimal: patch does not apply
> error: patch failed: Dockerfile.build-debian-mips:2
> error: Dockerfile.build-debian-mips: patch does not apply
> error: patch failed: Dockerfile.build-fedora:1
> error: Dockerfile.build-fedora: patch does not apply
> Patch failed at 0001 .gitlab-ci: Reduce Docker images size
> hint: Use 'git am --show-current-patch' to see the failed patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> 
> So it's not base64. Let me see what actually goes wrong. You can get the
> unencoded patch here: https://patchwork.freedesktop.org/patch/356524/raw/

00000030  65 2e 62 75 69 6c 64 2d  64 65 62 69 61 6e 0d 0a  |e.build-debian..|
                                                     ^^^^^ CRLF

This makes the context to not match which makes this patch to not apply.

Please make sure that when you are sending emails your setup does not
convert the line endings :-)

-- 
Cheers,
Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size
@ 2020-03-18  6:29 Ramotowski, Maciej
  0 siblings, 0 replies; 11+ messages in thread
From: Ramotowski, Maciej @ 2020-03-18  6:29 UTC (permalink / raw)
  To: igt-dev@lists.freedesktop.org; +Cc: Ramotowski, Maciej, Latvala, Petri

Make Dockerfile's more universal.

Reduce size of Ubuntu based images by removing package lists.

Add support for building with build cache and without --squash flag:

 - Using apt-get update alone in a RUN statement causes caching issues
   and subsequent apt-get install instructions fail.

 - When you run an image and generate a container, you add a new
   writable layer (the “container layer”) on top of the underlying
   layers. All changes made to the running container, such as writing
   new files, modifying existing files, and deleting files, are written
   to this thin  writable container layer.

Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Maciej Ramotowski <maciej.ramotowski@intel.com>
---
 Dockerfile.build-debian         | 39 +++++++---------
 Dockerfile.build-debian-arm64   | 68 ++++++++++++---------------
 Dockerfile.build-debian-armhf   | 67 ++++++++++++--------------
 Dockerfile.build-debian-minimal | 44 +++++++++--------
 Dockerfile.build-debian-mips    | 70 +++++++++++++--------------
 Dockerfile.build-fedora         | 83 ++++++++++++++++-----------------
 6 files changed, 172 insertions(+), 199 deletions(-)

diff --git a/Dockerfile.build-debian b/Dockerfile.build-debian
index b143a532..6cf7a1f0 100644
--- a/Dockerfile.build-debian
+++ b/Dockerfile.build-debian
@@ -7,25 +7,20 @@ FROM $CI_REGISTRY_IMAGE/build-debian-minimal:commit-$CI_COMMIT_SHA
 # just few extra dependencies for building IGT with all the optional components
 # enabled
 
-RUN apt-get update
-RUN apt-get install -y \
-			libunwind-dev \
-			libgsl-dev \
-			libasound2-dev \
-			libxmlrpc-core-c3-dev \
-			libjson-c-dev \
-			libcurl4-openssl-dev \
-			python-docutils \
-			valgrind \
-			peg \
-			libdrm-intel1
-
-# autotools build deps
-RUN apt-get install -y \
-			autoconf \
-			automake \
-			xutils-dev \
-			libtool \
-			make
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    autoconf \
+    automake \
+    libasound2-dev \
+    libcurl4-openssl-dev \
+    libdrm-intel1 \
+    libgsl-dev \
+    libjson-c-dev \
+    libtool \
+    libunwind-dev \
+    libxmlrpc-core-c3-dev \
+    make \
+    peg \
+    python-docutils \
+    valgrind \
+    xutils-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-arm64 b/Dockerfile.build-debian-arm64
index 573c7096..924432bd 100644
--- a/Dockerfile.build-debian-arm64
+++ b/Dockerfile.build-debian-arm64
@@ -1,40 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture arm64
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-aarch64-linux-gnu \
-			libatomic1:arm64 \
-			libpciaccess-dev:arm64 \
-			libkmod-dev:arm64 \
-			libprocps-dev:arm64 \
-			libunwind-dev:arm64 \
-			libdw-dev:arm64 \
-			zlib1g-dev:arm64 \
-			liblzma-dev:arm64 \
-			libcairo-dev:arm64 \
-			libpixman-1-dev:arm64 \
-			libudev-dev:arm64 \
-			libgsl-dev:arm64 \
-			libasound2-dev:arm64 \
-			libjson-c-dev:arm64 \
-			libcurl4-openssl-dev:arm64 \
-			libxrandr-dev:arm64 \
-			libxv-dev:arm64 \
-			meson \
-			libdrm-dev:arm64 \
-			qemu-user \
-			qemu-user-static
-
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-aarch64-linux-gnu \
+    libasound2-dev:arm64 \
+    libatomic1:arm64 \
+    libcairo-dev:arm64 \
+    libcurl4-openssl-dev:arm64 \
+    libdrm-dev:arm64 \
+    libdw-dev:arm64 \
+    libgsl-dev:arm64 \
+    libjson-c-dev:arm64 \
+    libkmod-dev:arm64 \
+    liblzma-dev:arm64 \
+    libpciaccess-dev:arm64 \
+    libpixman-1-dev:arm64 \
+    libprocps-dev:arm64 \
+    libudev-dev:arm64 \
+    libunwind-dev:arm64 \
+    libxrandr-dev:arm64 \
+    libxv-dev:arm64 \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:arm64 \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-armhf b/Dockerfile.build-debian-armhf
index 737ca364..3752dc91 100644
--- a/Dockerfile.build-debian-armhf
+++ b/Dockerfile.build-debian-armhf
@@ -1,39 +1,34 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture armhf
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-arm-linux-gnueabihf \
-			libatomic1:armhf \
-			libpciaccess-dev:armhf \
-			libkmod-dev:armhf \
-			libprocps-dev:armhf \
-			libunwind-dev:armhf \
-			libdw-dev:armhf \
-			zlib1g-dev:armhf \
-			liblzma-dev:armhf \
-			libcairo-dev:armhf \
-			libpixman-1-dev:armhf \
-			libudev-dev:armhf \
-			libgsl-dev:armhf \
-			libasound2-dev:armhf \
-			libjson-c-dev:armhf \
-			libcurl4-openssl-dev:armhf \
-			libxrandr-dev:armhf \
-			libxv-dev:armhf \
-			meson \
-			libdrm-dev:armhf \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-arm-linux-gnueabihf \
+    libasound2-dev:armhf \
+    libatomic1:armhf \
+    libcairo-dev:armhf \
+    libcurl4-openssl-dev:armhf \
+    libdrm-dev:armhf \
+    libdw-dev:armhf \
+    libgsl-dev:armhf \
+    libjson-c-dev:armhf \
+    libkmod-dev:armhf \
+    liblzma-dev:armhf \
+    libpciaccess-dev:armhf \
+    libpixman-1-dev:armhf \
+    libprocps-dev:armhf \
+    libudev-dev:armhf \
+    libunwind-dev:armhf \
+    libxrandr-dev:armhf \
+    libxv-dev:armhf \
+    meson \
+    peg \
+    pkg-config \
+    python-docutils \
+    qemu-user \
+    qemu-user-static \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:armhf \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-minimal b/Dockerfile.build-debian-minimal
index 64edf4b4..d0756be5 100644
--- a/Dockerfile.build-debian-minimal
+++ b/Dockerfile.build-debian-minimal
@@ -1,25 +1,23 @@
 FROM debian:buster
 
-RUN apt-get update
-RUN apt-get install -y \
-			gcc \
-			flex \
-			bison \
-			pkg-config \
-			libatomic1 \
-			libpciaccess-dev \
-			libkmod-dev \
-			libprocps-dev \
-			libdw-dev \
-			zlib1g-dev \
-			liblzma-dev \
-			libcairo-dev \
-			libpixman-1-dev \
-			libudev-dev \
-			libxrandr-dev \
-			libxv-dev \
-			x11proto-dri2-dev \
-			meson \
-			libdrm-dev
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc \
+    libatomic1 \
+    libcairo-dev \
+    libdrm-dev \
+    libdw-dev \
+    libkmod-dev \
+    liblzma-dev \
+    libpciaccess-dev \
+    libpixman-1-dev \
+    libprocps-dev \
+    libudev-dev \
+    libxrandr-dev \
+    libxv-dev \
+    meson \
+    pkg-config \
+    x11proto-dri2-dev \
+    zlib1g-dev \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-debian-mips b/Dockerfile.build-debian-mips
index 7e4bacdf..e52d403b 100644
--- a/Dockerfile.build-debian-mips
+++ b/Dockerfile.build-debian-mips
@@ -2,42 +2,36 @@
 # https://bugs.debian.org/932725
 FROM debian:stretch-backports
 
-RUN apt-get update
-RUN apt-get install -y \
-			flex \
-			bison \
-			pkg-config \
-			x11proto-dri2-dev \
-			python-docutils \
-			valgrind \
-			peg
-
 RUN dpkg --add-architecture mips
-RUN apt-get update
-RUN apt-get install -y \
-			gcc-mips-linux-gnu \
-			libatomic1:mips \
-			libpciaccess-dev:mips \
-			libkmod-dev:mips \
-			libprocps-dev:mips \
-			libunwind-dev:mips \
-			libdw-dev:mips \
-			zlib1g-dev:mips \
-			liblzma-dev:mips \
-			libcairo-dev:mips \
-			libpixman-1-dev:mips \
-			libudev-dev:mips \
-			libgsl-dev:mips \
-			libasound2-dev:mips \
-			libjson-c-dev:mips \
-			libcurl4-openssl-dev:mips \
-			libxrandr-dev:mips \
-			libxv-dev:mips
-
-RUN apt-get install -t stretch-backports -y \
-			meson \
-			libdrm-dev:mips \
-			qemu-user \
-			qemu-user-static
-
-RUN apt-get clean
+RUN apt-get update && apt-get install -y \
+    bison \
+    flex \
+    gcc-mips-linux-gnu \
+    libasound2-dev:mips \
+    libatomic1:mips \
+    libcairo-dev:mips \
+    libcurl4-openssl-dev:mips \
+    libdw-dev:mips \
+    libgsl-dev:mips \
+    libjson-c-dev:mips \
+    libkmod-dev:mips \
+    liblzma-dev:mips \
+    libpciaccess-dev:mips \
+    libpixman-1-dev:mips \
+    libprocps-dev:mips \
+    libudev-dev:mips \
+    libunwind-dev:mips \
+    libxrandr-dev:mips \
+    libxv-dev:mips \
+    peg \
+    pkg-config \
+    python-docutils \
+    valgrind \
+    x11proto-dri2-dev \
+    zlib1g-dev:mips \
+ && apt-get install -t stretch-backports -y \
+    libdrm-dev:mips \
+    meson \
+    qemu-user \
+    qemu-user-static \
+ && rm -rf /var/lib/apt/lists/*
diff --git a/Dockerfile.build-fedora b/Dockerfile.build-fedora
index dc5d1b16..34fff96b 100644
--- a/Dockerfile.build-fedora
+++ b/Dockerfile.build-fedora
@@ -1,50 +1,47 @@
 FROM fedora:31
 
 RUN dnf install -y \
-	gcc flex bison libatomic meson ninja-build xdotool \
-	'pkgconfig(libdrm)' \
-	'pkgconfig(pciaccess)' \
-	'pkgconfig(libkmod)' \
-	'pkgconfig(libprocps)' \
-	'pkgconfig(libunwind)' \
-	'pkgconfig(libdw)' \
-	'pkgconfig(pixman-1)' \
-	'pkgconfig(valgrind)' \
-	'pkgconfig(cairo)' \
-	'pkgconfig(libudev)' \
-	'pkgconfig(glib-2.0)' \
-	'pkgconfig(gsl)' \
-	'pkgconfig(alsa)' \
-	'pkgconfig(xmlrpc)' \
-	'pkgconfig(xmlrpc_util)' \
-	'pkgconfig(xmlrpc_client)' \
-	'pkgconfig(json-c)' \
-	'pkgconfig(gtk-doc)' \
-	'pkgconfig(xv)' \
-	'pkgconfig(xrandr)' \
-	python3-docutils
-
-# We need peg to build overlay
-RUN dnf install -y make
-RUN mkdir /tmp/peg
+    'pkgconfig(alsa)' \
+    'pkgconfig(cairo)' \
+    'pkgconfig(glib-2.0)' \
+    'pkgconfig(gsl)' \
+    'pkgconfig(gtk-doc)' \
+    'pkgconfig(json-c)' \
+    'pkgconfig(libdrm)' \
+    'pkgconfig(libdw)' \
+    'pkgconfig(libkmod)' \
+    'pkgconfig(libprocps)' \
+    'pkgconfig(libudev)' \
+    'pkgconfig(libunwind)' \
+    'pkgconfig(pciaccess)' \
+    'pkgconfig(pixman-1)' \
+    'pkgconfig(valgrind)' \
+    'pkgconfig(xmlrpc)' \
+    'pkgconfig(xmlrpc_client)' \
+    'pkgconfig(xmlrpc_util)' \
+    'pkgconfig(xrandr)' \
+    'pkgconfig(xv)' \
+    bison \
+    clang \
+    diffutils \
+    findutils \
+    flex \
+    gcc \
+    libatomic \
+    make \
+    meson \
+    ninja-build \
+    python3-docutils \
+    python3-pip \
+    xdotool \
+ && dnf clean all
 
 # originaly from http://piumarta.com/software/peg/
-RUN curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}"
-RUN tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz
-RUN make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install
-RUN rm -fr /tmp/peg
-
-# For compile-testing on clang
-RUN dnf install -y clang
-
-# For test list comparison
-RUN dnf install -y diffutils
+RUN mkdir /tmp/peg \
+ && curl -o "/tmp/peg/#1" "https://intel-gfx-ci.01.org/mirror/peg/{peg-0.1.18.tar.gz}" \
+ && tar -C /tmp/peg -xf /tmp/peg/peg-0.1.18.tar.gz \
+ && ls /tmp/peg \
+ && make -C /tmp/peg/peg-0.1.18 PREFIX=/usr install \
+ && rm -fr /tmp/peg
 
-# For the helpers for the container with IGT inside
-RUN dnf install -y findutils
-
-# Meson version switching shenanigans
-RUN dnf install -y python3-pip
 RUN curl -o "/usr/src/#1" "https://files.pythonhosted.org/packages/e8/ec/3e6a68c9e0fd4b4f4fb6877a3ccfb6f6e6d09f2b4fc87674e671bf64b7b8/{meson-0.47.2.tar.gz}"
-
-RUN dnf clean all
-- 
2.17.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-03-18  6:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-05 10:55 [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Ramotowski, Maciej
2020-03-05 11:23 ` [igt-dev] ✗ Fi.CI.BUILD: failure for .gitlab-ci: Reduce Docker images size (rev2) Patchwork
2020-03-05 12:10 ` [igt-dev] [PATCH] .gitlab-ci: Reduce Docker images size Petri Latvala
2020-03-05 13:39   ` Ramotowski, Maciej
2020-03-05 13:43     ` Petri Latvala
2020-03-05 13:48     ` Arkadiusz Hiler
2020-03-05 13:57       ` Petri Latvala
2020-03-05 14:00       ` Arkadiusz Hiler
  -- strict thread matches above, loose matches on Subject: below --
2020-03-18  6:29 Ramotowski, Maciej
2020-02-27 10:23 Ramotowski, Maciej
2020-03-05 10:21 ` Arkadiusz Hiler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox