All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/5] support/docker: run apt-get update and apt-get install in two RUNs
Date: Sun,  3 Jun 2018 11:08:18 +0200	[thread overview]
Message-ID: <474022096f189332bf42c3da6e299b85f252efed.1528016895.git.yann.morin.1998@free.fr> (raw)
In-Reply-To: <cover.1528016895.git.yann.morin.1998@free.fr>

In commit 7517aef4d (support/docker: limit the number of layers),
we reduced the number of layers by coalescing multiple RUN commands
into less commands.

In doing so, we especially coalesced "apt-get update" with "apt-get
install".

However, the distribution we used is a pinned version of stretch, so
we know that running apt-get update will always yield the same apt
database.

If we split the two apt-get commands, then we can re-use any local
intermediate image when we need to update the list of packages to
install; this helps quite a bit when testing the docker files over
and over again, with just slight variants in the packages list.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
---
 support/docker/Dockerfile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/support/docker/Dockerfile b/support/docker/Dockerfile
index f01ac25f93..8c525f7cf1 100644
--- a/support/docker/Dockerfile
+++ b/support/docker/Dockerfile
@@ -20,8 +20,8 @@ COPY apt-sources.list /etc/apt/sources.list
 
 # The container has no package lists, so need to update first
 RUN dpkg --add-architecture i386 && \
-    apt-get update -y && \
-    apt-get install -y --no-install-recommends \
+    apt-get update -y
+RUN apt-get install -y --no-install-recommends \
         build-essential cmake libc6:i386 g++-multilib \
         bc ca-certificates file locales rsync \
         cvs bzr git mercurial subversion wget \
-- 
2.14.1

  reply	other threads:[~2018-06-03  9:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-03  9:08 [Buildroot] [PATCH 0/5] support/docker: make the image more reproducible Yann E. MORIN
2018-06-03  9:08 ` Yann E. MORIN [this message]
2018-06-03 18:31   ` [Buildroot] [PATCH 1/5] support/docker: run apt-get update and apt-get install in two RUNs Thomas Petazzoni
2018-06-03  9:08 ` [Buildroot] [PATCH 2/5] support/docker: sort the list of installed packages Yann E. MORIN
2018-06-03 23:21   ` Ricardo Martincoski
2018-06-04 16:11     ` Yann E. MORIN
2018-06-03  9:08 ` [Buildroot] [PATCH 3/5] support/docker: use the distro-provided flake8 Yann E. MORIN
2018-06-05  2:12   ` Ricardo Martincoski
2018-06-03  9:08 ` [Buildroot] [PATCH 4/5] support/testing: fix python syntax Yann E. MORIN
2018-06-05  2:17   ` Ricardo Martincoski
2018-06-05  5:51     ` Thomas Petazzoni
2018-06-10 13:57   ` Thomas Petazzoni
2018-06-03  9:08 ` [Buildroot] [PATCH 5/5] support/docker: update to python3-flavoured flake8 Yann E. MORIN

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=474022096f189332bf42c3da6e299b85f252efed.1528016895.git.yann.morin.1998@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.