From 41259304318f025d8868961d33d9289af3b1aa6c Mon Sep 17 00:00:00 2001 From: Taylor Silva Date: Wed, 21 Jul 2021 16:49:08 -0400 Subject: [PATCH] update os package layers when building images Signed-off-by: Taylor Silva Co-authored-by: Rui Yang --- dockerfiles/alpine/Dockerfile | 1 + dockerfiles/ubuntu/Dockerfile | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dockerfiles/alpine/Dockerfile b/dockerfiles/alpine/Dockerfile index 1ed3496..c4950b8 100644 --- a/dockerfiles/alpine/Dockerfile +++ b/dockerfiles/alpine/Dockerfile @@ -22,6 +22,7 @@ RUN set -e; \ # stage: resource FROM ${base_image} AS resource +RUN apk update && apk upgrade RUN apk --no-cache add \ bash \ docker \ diff --git a/dockerfiles/ubuntu/Dockerfile b/dockerfiles/ubuntu/Dockerfile index d7cd4f4..970d4d2 100644 --- a/dockerfiles/ubuntu/Dockerfile +++ b/dockerfiles/ubuntu/Dockerfile @@ -23,9 +23,10 @@ RUN set -e; \ # stage: resource FROM ${base_image} AS resource +RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef" # docker hosts their own packages, this steps sets up the repo for apt-get -RUN apt-get update; \ - apt-get install -y --no-install-recommends \ +RUN apt update; \ + apt install -y --no-install-recommends \ apt-transport-https \ ca-certificates \ curl \ @@ -37,7 +38,7 @@ RUN apt-get update; \ $(lsb_release -cs) \ stable"; -RUN apt-get update && apt-get install -y --no-install-recommends \ +RUN apt update && apt install -y --no-install-recommends \ docker-ce \ jq \ ca-certificates \