Received: from eggs.gnu.org ([2001:4830:134:3::10]:36548) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d7qz3-0008P1-JL for qemu-devel@nongnu.org; Mon, 08 May 2017 18:18:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d7qz2-0006rz-8Z for qemu-devel@nongnu.org; Mon, 08 May 2017 18:18:25 -0400 Received: from mail-qt0-x243.google.com ([2607:f8b0:400d:c0d::243]:35258) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d7qz2-0006rt-4l for qemu-devel@nongnu.org; Mon, 08 May 2017 18:18:24 -0400 Received: by mail-qt0-x243.google.com with SMTP id r58so11460040qtb.2 for ; Mon, 08 May 2017 15:18:24 -0700 (PDT) Sender: =?UTF-8?Q?Philippe_Mathieu=2DDaud=C3=A9?= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 8 May 2017 19:17:43 -0300 Message-Id: <20170508221759.15616-6-f4bug@amsat.org> In-Reply-To: <20170508221759.15616-1-f4bug@amsat.org> References: <20170508221759.15616-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v2 05/21] docker: compact debian base List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , Fam Zheng Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= - 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é --- 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