From 65d82608805980e0f290b6d06b5f0151860cf305 Mon Sep 17 00:00:00 2001 From: Luca Pireddu Date: Wed, 18 Sep 2019 13:59:15 +0200 Subject: [PATCH] Don't upgrade base image; clean cached deb files after apt-get install --- base-notebook/Dockerfile | 4 ++-- base-notebook/Dockerfile.ppc64le | 5 ++--- minimal-notebook/Dockerfile | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/base-notebook/Dockerfile b/base-notebook/Dockerfile index 13406c49..7f4b72f4 100644 --- a/base-notebook/Dockerfile +++ b/base-notebook/Dockerfile @@ -16,7 +16,7 @@ USER root # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get -yq dist-upgrade \ +RUN apt-get update \ && apt-get install -yq --no-install-recommends \ wget \ bzip2 \ @@ -25,7 +25,7 @@ RUN apt-get update && apt-get -yq dist-upgrade \ locales \ fonts-liberation \ run-one \ - && rm -rf /var/lib/apt/lists/* + && apt-get clean && rm -rf /var/lib/apt/lists/* RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \ locale-gen diff --git a/base-notebook/Dockerfile.ppc64le b/base-notebook/Dockerfile.ppc64le index b8d47f08..2b067784 100644 --- a/base-notebook/Dockerfile.ppc64le +++ b/base-notebook/Dockerfile.ppc64le @@ -11,7 +11,7 @@ USER root # Install all OS dependencies for notebook server that starts but lacks all # features (e.g., download as all possible file formats) ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get -yq dist-upgrade \ +RUN apt-get update \ && apt-get install -yq --no-install-recommends \ build-essential \ bzip2 \ @@ -21,8 +21,7 @@ RUN apt-get update && apt-get -yq dist-upgrade \ locales \ sudo \ wget \ - && \ - rm -rf /var/lib/apt/lists/* + && apt-get clean && rm -rf /var/lib/apt/lists/* RUN echo "LANGUAGE=en_US.UTF-8" >> /etc/default/locale RUN echo "LC_ALL=en_US.UTF-8" >> /etc/default/locale diff --git a/minimal-notebook/Dockerfile b/minimal-notebook/Dockerfile index 8e3f48d8..a706eefc 100644 --- a/minimal-notebook/Dockerfile +++ b/minimal-notebook/Dockerfile @@ -30,7 +30,7 @@ RUN apt-get update && apt-get install -yq --no-install-recommends \ tzdata \ unzip \ nano \ - && rm -rf /var/lib/apt/lists/* + && apt-get clean && rm -rf /var/lib/apt/lists/* # Switch back to jovyan to avoid accidental container runs as root USER $NB_UID