qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/23] docker: compact debian base


From: Alex Bennée
Subject: Re: [Qemu-devel] [PATCH 04/23] docker: compact debian base
Date: Mon, 08 May 2017 12:04:11 +0100
User-agent: mu4e 0.9.19; emacs 25.2.17

Philippe Mathieu-Daudé <address@hidden> writes:

> - install common/basic tools at once
> - one-line Emdebian setup
> - use eatmydata and remove apt cache to save space
> - add bison and flex and git
>
> Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
> ---
>  tests/docker/dockerfiles/debian.docker | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/tests/docker/dockerfiles/debian.docker 
> b/tests/docker/dockerfiles/debian.docker
> index 52bd79938e..694f8d3b63 100644
> --- a/tests/docker/dockerfiles/debian.docker
> +++ b/tests/docker/dockerfiles/debian.docker
> @@ -9,17 +9,19 @@
>  #
>  FROM debian:stable-slim
>
> -# Setup some basic tools we need
> -RUN apt update
> -RUN apt install -yy curl aptitude
> -
> -# 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 -
> +# Install some basic tools and common build utilities
> +RUN apt-get update && \
> +    DEBIAN_FRONTEND=noninteractive apt-get install -yy \
> +        eatmydata && \

I wonder if we should just use ENV instead to set DEBIAN_FRONTEND?

> +    DEBIAN_FRONTEND=noninteractive eatmydata apt-get install -y 
> --no-install-recommends \
> +        curl aptitude \
> +        build-essential clang git \
> +        bison flex && \
> +    rm -rf /var/lib/apt

Use apt clean to do this.

>
>  # 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
> +# Setup Emdebian
> +RUN 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 -

Why move this to the end? Once we have curl installed it would be nice
to do just one update step and have emdebian synced up in the base
image.


--
Alex Bennée



reply via email to

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