更新glibc包装中的套件

发布于 2025-01-31 11:11:49 字数 540 浏览 2 评论 0原文

我正在使用多阶段Docker构建来分散,并使用“ gcr.io/distroless/java:8”用于我的容器,但是gcr.io/distroless/java安装的软件包版本:8 a href =“ https://nvd.nist.gov/vuln/detail/cve-2020-1752” rel =“ nofollow noreferrer”> https://nvd.nist.gov/vuln/detail/cve-202020202020-17522 我如何更新分散图像中的包装版本`

openjdk:8 as build

workdir/app

run apt-get get

unlun apt-get升级libexpat1-dev libexpat1-dev libexpat1 openssl openssl unzip-y

from gcr.io/distroless /java:8-debug

副本-from = build /app /app

workdir /app

cmd [“ java命令”]

i am using use multi stage docker build for distroless and using "gcr.io/distroless/java:8" for my container but the packages version installed by gcr.io/distroless/java:8 have several security issues such as glibc 2.31 https://nvd.nist.gov/vuln/detail/CVE-2020-1752 how can i update the versions of packages inside the distroless image `

FROM openjdk:8 AS build

WORKDIR /app

RUN apt-get update

RUN apt-get upgrade libexpat1-dev libexpat1 openssl unzip -y

FROM gcr.io/distroless/java:8-debug

COPY --from=build /app /app

WORKDIR /app

CMD ["java commands"]`

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

物价感观 2025-02-07 11:11:49

分散意味着您没有bash或易于更新容器的狂欢,因此您应该使用另一个具有这些安全缺陷的干扰版本。创建新图像,测试它们,将其上传到注册表,更新部署YAML文件,然后重新开始。

Distroless means that you don't have bash or apt to update the container, so you should use another distroless version that has these security flaws fixed. Create new images, test them, upload them to the registry, update the deployment yaml files, and start over.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文