From da435c1497ea681f01b8f812e8b4b59d579e7653 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Fri, 5 Feb 2016 13:21:56 +0100 Subject: [PATCH] Always run "apt-get update" When only leaf images are rebuilt, the Packages index might be outdated and refer to packages that no longer exist in the archive. Always running "apt-get update" before installing packages avoids this. Also remove contents of /var/lib/apt/lists as we no longer use it and it allows to keep the images slightly smaller. --- base-8/Dockerfile | 6 +++--- base-9/Dockerfile | 6 +++--- dune-2.3/Dockerfile | 4 ++-- dune-2.4/Dockerfile | 5 ++--- dune-fufem/Dockerfile | 4 ++-- dune-git/Dockerfile | 4 ++-- 6 files changed, 14 insertions(+), 15 deletions(-) diff --git a/base-8/Dockerfile b/base-8/Dockerfile index d5e1010..04723c1 100644 --- a/base-8/Dockerfile +++ b/base-8/Dockerfile @@ -1,7 +1,7 @@ FROM debian:8 MAINTAINER Ansgar.Burchardt@tu-dresden.de -RUN apt-get update && apt-get dist-upgrade --no-install-recommends --yes -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get dist-upgrade --no-install-recommends --yes \ + && apt-get install --no-install-recommends --yes \ autoconf \ automake \ bison \ @@ -23,7 +23,7 @@ RUN apt-get install --no-install-recommends --yes \ openssh-client \ pkg-config \ python-dev \ - && apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* RUN adduser --disabled-password --home /duneci duneci USER duneci WORKDIR /duneci diff --git a/base-9/Dockerfile b/base-9/Dockerfile index 32b575a..1eed489 100644 --- a/base-9/Dockerfile +++ b/base-9/Dockerfile @@ -1,7 +1,7 @@ FROM debian:stretch MAINTAINER Ansgar.Burchardt@tu-dresden.de -RUN apt-get update && apt-get dist-upgrade --no-install-recommends --yes -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get dist-upgrade --no-install-recommends --yes \ + && apt-get install --no-install-recommends --yes \ autoconf \ automake \ bison \ @@ -23,7 +23,7 @@ RUN apt-get install --no-install-recommends --yes \ openssh-client \ python-dev \ pkg-config \ - && apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* RUN adduser --disabled-password --home /duneci duneci USER duneci WORKDIR /duneci diff --git a/dune-2.3/Dockerfile b/dune-2.3/Dockerfile index 9c8b933..3ee435f 100644 --- a/dune-2.3/Dockerfile +++ b/dune-2.3/Dockerfile @@ -2,13 +2,13 @@ FROM duneci/base:8 USER root WORKDIR / -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get install --no-install-recommends --yes \ libdune-common-dev \ libdune-geometry-dev \ libdune-grid-dev \ libdune-localfunctions-dev \ libdune-istl-dev \ - && apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* USER duneci WORKDIR /duneci diff --git a/dune-2.4/Dockerfile b/dune-2.4/Dockerfile index 3b21e22..a4fe803 100644 --- a/dune-2.4/Dockerfile +++ b/dune-2.4/Dockerfile @@ -2,14 +2,13 @@ FROM duneci/base:9 USER root WORKDIR / -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get install --no-install-recommends --yes \ libdune-common-dev \ libdune-geometry-dev \ libdune-grid-dev \ libdune-localfunctions-dev \ libdune-istl-dev \ - && apt-get clean -RUN apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* # patch from commit 652c97d013df39f7192f2d5d54000c36e04fe0de RUN sed -i -e '/check_include_files/ iinclude(CheckIncludeFiles)' /usr/share/dune/cmake/modules/FindAlberta.cmake diff --git a/dune-fufem/Dockerfile b/dune-fufem/Dockerfile index 103394f..a08b000 100644 --- a/dune-fufem/Dockerfile +++ b/dune-fufem/Dockerfile @@ -2,9 +2,9 @@ FROM duneci/dune:2.4 USER root WORKDIR / -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get install --no-install-recommends --yes \ libdune-grid-glue-dev \ - && apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* USER duneci WORKDIR /duneci diff --git a/dune-git/Dockerfile b/dune-git/Dockerfile index 5546b01..8fb5357 100644 --- a/dune-git/Dockerfile +++ b/dune-git/Dockerfile @@ -2,13 +2,13 @@ FROM duneci/base:9 USER root WORKDIR / -RUN apt-get install --no-install-recommends --yes \ +RUN apt-get update && apt-get install --no-install-recommends --yes \ gnuplot-nox \ libscotchmetis-dev \ libug-dev \ locales-all \ python-vtk6 \ - && apt-get clean + && apt-get clean && rm -rf /var/lib/apt/lists/* USER duneci WORKDIR /duneci -- GitLab