From 7c92854e5dd1d192614750e2a80d27443879fad9 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Fri, 6 Mar 2020 15:42:40 +0530 Subject: [PATCH 1/2] debian: Don't install recommended software By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install. This results in smaller downloads and installation of packages . Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) . Fixes: #427 Signed-off-by: Pratik Raj --- rootfs-builder/debian/Dockerfile.in | 2 +- rootfs-builder/ubuntu/Dockerfile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rootfs-builder/debian/Dockerfile.in b/rootfs-builder/debian/Dockerfile.in index ed57ec1a4f..3120428c91 100644 --- a/rootfs-builder/debian/Dockerfile.in +++ b/rootfs-builder/debian/Dockerfile.in @@ -7,7 +7,7 @@ from docker.io/debian:@OS_VERSION@ # RUN commands -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get --no-install-recommends install -y \ autoconf \ automake \ binutils \ diff --git a/rootfs-builder/ubuntu/Dockerfile.in b/rootfs-builder/ubuntu/Dockerfile.in index f54b04db0c..2fdc88d85e 100644 --- a/rootfs-builder/ubuntu/Dockerfile.in +++ b/rootfs-builder/ubuntu/Dockerfile.in @@ -11,7 +11,7 @@ from docker.io/ubuntu:@OS_VERSION@ # Install any package need to create a rootfs (package manager, extra tools) # RUN commands -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get --no-install-recommends install -y \ autoconf \ automake \ binutils \ From 8d7817805a6740bef06e63729042d65c325ab634 Mon Sep 17 00:00:00 2001 From: Pratik Raj Date: Fri, 6 Mar 2020 16:15:40 +0530 Subject: [PATCH 2/2] debian: Install missing ca-certificates package Because CI build is 1. Slow and in log it is showing because "apt-utils" not installed 2. to avoid CI build to exits with error without having certificate Fixes: #427 Signed-off-by: Pratik Raj --- rootfs-builder/debian/Dockerfile.in | 2 ++ rootfs-builder/ubuntu/Dockerfile.in | 2 ++ 2 files changed, 4 insertions(+) diff --git a/rootfs-builder/debian/Dockerfile.in b/rootfs-builder/debian/Dockerfile.in index 3120428c91..88629aefae 100644 --- a/rootfs-builder/debian/Dockerfile.in +++ b/rootfs-builder/debian/Dockerfile.in @@ -8,10 +8,12 @@ from docker.io/debian:@OS_VERSION@ # RUN commands RUN apt-get update && apt-get --no-install-recommends install -y \ + apt-utils \ autoconf \ automake \ binutils \ build-essential \ + ca-certificates \ chrony \ cmake \ coreutils \ diff --git a/rootfs-builder/ubuntu/Dockerfile.in b/rootfs-builder/ubuntu/Dockerfile.in index 2fdc88d85e..a5da267a4e 100644 --- a/rootfs-builder/ubuntu/Dockerfile.in +++ b/rootfs-builder/ubuntu/Dockerfile.in @@ -12,10 +12,12 @@ from docker.io/ubuntu:@OS_VERSION@ # RUN commands RUN apt-get update && apt-get --no-install-recommends install -y \ + apt-utils \ autoconf \ automake \ binutils \ build-essential \ + ca-certificates \ chrony \ cmake \ coreutils \