更新glibc包装中的套件
我正在使用多阶段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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分散意味着您没有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.