[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
- [Qemu-devel] [PATCH 01/23] shippable: use C locale to simplify console output, (continued)
- [Qemu-devel] [RFC PATCH 03/23] shippable: ignore SSL verification, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 04/23] docker: compact debian base, Philippe Mathieu-Daudé, 2017/05/08
- Re: [Qemu-devel] [PATCH 04/23] docker: compact debian base,
Alex Bennée <=
- [Qemu-devel] [PATCH 05/23] docker: compact debian armhf, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 06/23] docker: compact debian arm64, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 08/23] docker: add extra libs to arm64 target to extend codebase coverage, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 07/23] docker: add extra libs to armhf target to extend codebase coverage, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 09/23] docker: add extra libs to s390x target to extend codebase coverage, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 11/23] shippable: add mipsel target, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 10/23] docker: add mipsel build target, Philippe Mathieu-Daudé, 2017/05/08
- [Qemu-devel] [PATCH 12/23] docker: let _copy_with_mkdir() sub_path argument be optional, Philippe Mathieu-Daudé, 2017/05/08