From 627a1f9bc71291f3b8e8d9fe5ff09fbb6abeb072 Mon Sep 17 00:00:00 2001 From: Taylor Silva Date: Wed, 21 Jul 2021 16:53:13 -0400 Subject: [PATCH] update os packages 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 c0bcc80..378f841 100644 --- a/dockerfiles/alpine/Dockerfile +++ b/dockerfiles/alpine/Dockerfile @@ -14,6 +14,7 @@ RUN set -e; mkdir /tests; for pkg in $(go list ./...); do \ done FROM ${base_image} AS resource +RUN apk update && apk upgrade RUN apk add --update bash tzdata ca-certificates git COPY --from=builder /assets /opt/resource diff --git a/dockerfiles/ubuntu/Dockerfile b/dockerfiles/ubuntu/Dockerfile index 538ffc1..f97c0a4 100644 --- a/dockerfiles/ubuntu/Dockerfile +++ b/dockerfiles/ubuntu/Dockerfile @@ -14,9 +14,10 @@ RUN set -e; mkdir /tests; for pkg in $(go list ./...); do \ done FROM ${base_image} AS resource -RUN apt-get update \ +RUN apt update && apt upgrade -y -o Dpkg::Options::="--force-confdef" +RUN apt update \ && DEBIAN_FRONTEND=noninteractive \ - apt-get install -y --no-install-recommends \ + apt install -y --no-install-recommends \ tzdata \ ca-certificates \ git \