qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH v2 05/21] docker: compact debian base


From: Philippe Mathieu-Daudé
Subject: [Qemu-devel] [PATCH v2 05/21] docker: compact debian base
Date: Mon, 8 May 2017 19:17:43 -0300

- install common/basic tools at once
- use eatmydata and remove apt cache to save space
- add bison and flex and git
- create deb-src entry and setup Emdebian in the same layer

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 tests/docker/dockerfiles/debian.docker | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/tests/docker/dockerfiles/debian.docker 
b/tests/docker/dockerfiles/debian.docker
index d08def6a8d..dcded3ce84 100644
--- a/tests/docker/dockerfiles/debian.docker
+++ b/tests/docker/dockerfiles/debian.docker
@@ -9,17 +9,17 @@
 #
 FROM debian:stable-slim
 
-# Setup some basic tools we need
-RUN apt update
-RUN apt install -yy aptitude ca-certificates curl
+# Install some basic tools and common build utilities
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -yy \
+        eatmydata && \
+    DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -y 
--no-install-recommends \
+        aptitude ca-certificates curl \
+        build-essential clang git \
+        bison flex && \
+    apt-get clean
 
-# Setup Emdebian
-RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> 
/etc/apt/sources.list
-RUN curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | 
apt-key add -
-
-# Duplicate deb line as deb-src
-RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list
-
-# Install common build utilities
-RUN apt update
-RUN apt install -yy build-essential clang
+# Duplicate deb line as deb-src, setup Emdebian
+RUN cat /etc/apt/sources.list | sed "s/deb/deb-src/" >> /etc/apt/sources.list 
&& \
+    echo "deb http://emdebian.org/tools/debian/ jessie main" >> 
/etc/apt/sources.list && \
+    curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | 
apt-key add -
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]