From cd64a463513e7c4728a8f489d109f8741bee41fd Mon Sep 17 00:00:00 2001 From: Taylor Silva Date: Wed, 21 Jul 2021 16:50:10 -0400 Subject: [PATCH] update os package layer when building images Signed-off-by: Taylor Silva Co-authored-by: Rui Yang --- dockerfiles/alpine/Dockerfile | 1 + dockerfiles/ubuntu/Dockerfile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dockerfiles/alpine/Dockerfile b/dockerfiles/alpine/Dockerfile index 9671cc7..d5e8611 100644 --- a/dockerfiles/alpine/Dockerfile +++ b/dockerfiles/alpine/Dockerfile @@ -18,6 +18,7 @@ RUN set -e; for pkg in $(go list ./...); do \ done FROM ${base_image} AS resource +RUN apk update && apk upgrade RUN apk add --no-cache bash tzdata ca-certificates unzip zip gzip tar COPY --from=builder assets/ /opt/resource/ RUN chmod +x /opt/resource/* diff --git a/dockerfiles/ubuntu/Dockerfile b/dockerfiles/ubuntu/Dockerfile index 0485f32..66f7d93 100644 --- a/dockerfiles/ubuntu/Dockerfile +++ b/dockerfiles/ubuntu/Dockerfile @@ -19,8 +19,9 @@ RUN set -e; for pkg in $(go list ./...); do \ FROM ${base_image} AS resource ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ +RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef" +RUN apt update \ + && apt install -y --no-install-recommends \ tzdata \ ca-certificates \ unzip \