Closed ranjith-ka closed 2 years ago
You could manually update the package with apt update
and apt install zlib1g
and make a derived image with the updated package like
$ docker build -t openjdk:test - << EOF
FROM openjdk:slim-buster
RUN apt update && apt install -y zlib1g && rm -rf /var/lib/apt/lists/*
EOF
And if you want to then even docker tag
that to overwrite the existing openjdk:slim-buster
image.
$ docker tag openjdk:test openjdk:slim-buster
$ docker run --rm openjdk:slim-buster apt list | grep -i zlib1g
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
zlib1g/now 1:1.2.11.dfsg-1+deb10u1 amd64 [installed,local]
But since the image was updated recently https://github.com/docker-library/official-images/pull/12136 and the Debian security team considers it a minor issue then it will get updated on the usual monthly cadence Background:
Tags in the [official-images] library file[s] are only built through an update to that library file or as a result of its base image being updated (ie, an image
FROM debian:buster
would be rebuilt whendebian:buster
is built).
Official Images FAQ:
Though not every CVE is removed from the images, we take CVEs seriously and try to ensure that images contain the most up-to-date packages available within a reasonable time frame
Since our build system makes heavy use of Docker build cache, just rebuilding the all of the Dockerfiles won't cause any change. So we rely on periodic base image updates.
We strive to publish updated images at least monthly for Debian and Ubuntu. We also rebuild earlier if there is a critical security need. Many Official Images are maintained by the community or their respective upstream projects, like Alpine and Oracle Linux, and are subject to their own maintenance schedule.
- from the same FAQ link
Thanks i can underestand better now.
Hi team,
looks the base image still have some vulenrable things in debian:buster-slim
https://github.com/docker-library/openjdk/blob/master/8/jre/slim-buster/Dockerfile
https://security-tracker.debian.org/tracker/CVE-2018-25032
any tips to fix this ?