qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 05/21] docker: compact debian base
Date: Tue, 9 May 2017 16:05:43 +0800	[thread overview]
Message-ID: <20170509080543.GD18973@lemon.lan> (raw)
In-Reply-To: <87k25q8oc2.fsf@linaro.org>

On Tue, 05/09 08:46, Alex Bennée wrote:
> 
> Fam Zheng <famz@redhat.com> writes:
> 
> > On Mon, 05/08 19:17, Philippe Mathieu-Daudé wrote:
> >> - 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é <f4bug@amsat.org>
> >> ---
> >>  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
> >
> > Any particular reason to make multiple "RUN" directives into one?
> 
> It reduces the number of layers you generate during the building
> process. I'm not sure how much space that saves in the long run though
> (disk space is pretty cheap ;-).

I don't think it matters much, but refreshing an image gets slower due to
coarser cache, for example when you add a package in the big "apt-get install"
command.

I don't see a strong reason why this is better. It clutters the file and is
inconsistent.

  reply	other threads:[~2017-05-09  8:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 22:17 [Qemu-devel] [PATCH v2 00/21] docker/shippable: cross-build mipsel and powerpc targets Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 01/21] docker: let _copy_with_mkdir() sub_path argument be optional Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 02/21] docker: add --include-file argument to 'build' command Philippe Mathieu-Daudé
2017-05-09  4:01   ` Fam Zheng
2017-05-09 12:14     ` Philippe Mathieu-Daudé
2017-05-09 12:31       ` Fam Zheng
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 03/21] docker: add 'apt-fake' script which generate fake debian packages Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 04/21] docker: install ca-certificates package in base image Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 05/21] docker: compact debian base Philippe Mathieu-Daudé
2017-05-09  4:04   ` Fam Zheng
2017-05-09  7:46     ` Alex Bennée
2017-05-09  8:05       ` Fam Zheng [this message]
2017-05-09 12:06         ` Philippe Mathieu-Daudé
2017-05-09 12:18           ` Fam Zheng
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 06/21] docker: compact debian armhf Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 07/21] docker: compact debian arm64 Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 08/21] docker: add extra libs to armhf target to extend codebase coverage Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 09/21] docker: add extra libs to arm64 " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 10/21] docker: add extra libs to s390x " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 11/21] docker: add mipsel build target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 12/21] docker: add powerpc " Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 13/21] shippable: use C locale to simplify console output Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 14/21] shippable: build using all available cpus Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 15/21] shippable: do not initialize submodules automatically Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 16/21] shippable: be verbose while building docker images Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 17/21] shippable: add armeb-linux-user target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 18/21] shippable: add powerpc target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 19/21] shippable: add mipsel target Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 20/21] MAINTAINERS: add Shippable automation platform URL Philippe Mathieu-Daudé
2017-05-08 22:17 ` [Qemu-devel] [PATCH v2 21/21] MAINTAINERS: self-appoint me as reviewer in build/test automation Philippe Mathieu-Daudé
2017-05-17 14:28 ` [Qemu-devel] [PATCH v2 00/21] docker/shippable: cross-build mipsel and powerpc targets Alex Bennée
2017-05-20 23:57   ` Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170509080543.GD18973@lemon.lan \
    --to=famz@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).