diff --git a/build/dockerfiles/apk.Dockerfile b/build/dockerfiles/apk.Dockerfile index ce4a0afcb87d..808b89f3aa25 100644 --- a/build/dockerfiles/apk.Dockerfile +++ b/build/dockerfiles/apk.Dockerfile @@ -17,7 +17,8 @@ ARG KONG_ARTIFACT=kong.${TARGETARCH}.apk.tar.gz ARG KONG_ARTIFACT_PATH= COPY ${KONG_ARTIFACT_PATH}${KONG_ARTIFACT} /tmp/kong.apk.tar.gz -RUN apk add --virtual .build-deps tar gzip \ +RUN apk upgrade --update-cache \ + && apk add --virtual .build-deps tar gzip \ && tar -C / -xzf /tmp/kong.apk.tar.gz \ && apk add --no-cache libstdc++ libgcc pcre perl tzdata libcap zlib zlib-dev bash yaml \ && adduser -S kong \ diff --git a/build/dockerfiles/deb.Dockerfile b/build/dockerfiles/deb.Dockerfile index 0a568272f8f0..7a45d2dcfbf1 100644 --- a/build/dockerfiles/deb.Dockerfile +++ b/build/dockerfiles/deb.Dockerfile @@ -18,6 +18,8 @@ ARG KONG_ARTIFACT_PATH= COPY ${KONG_ARTIFACT_PATH}${KONG_ARTIFACT} /tmp/kong.deb RUN apt-get update \ + && apt-get -y upgrade \ + && apt-get -y autoremove \ && apt-get install -y --no-install-recommends /tmp/kong.deb \ && rm -rf /var/lib/apt/lists/* \ && rm -rf /tmp/kong.deb \ diff --git a/build/dockerfiles/rpm.Dockerfile b/build/dockerfiles/rpm.Dockerfile index 042081a735f9..9dd4b87ebf02 100644 --- a/build/dockerfiles/rpm.Dockerfile +++ b/build/dockerfiles/rpm.Dockerfile @@ -32,7 +32,8 @@ ARG KONG_ARTIFACT_PATH= COPY ${KONG_ARTIFACT_PATH}${KONG_ARTIFACT} /tmp/kong.rpm # hadolint ignore=DL3015 -RUN yum install -y /tmp/kong.rpm \ +RUN yum update -y \ + && yum install -y /tmp/kong.rpm \ && rm /tmp/kong.rpm \ && chown kong:0 /usr/local/bin/kong \ && chown -R kong:0 /usr/local/kong \