gpt4 book ai didi

dockerfile - Docker distroless 镜像如何将自定义证书添加到信任存储?

转载 作者:行者123 更新时间:2023-12-03 23:15:07 32 4
gpt4 key购买 nike

gcr.io/distroless/java

如何添加自定义pki证书?

最佳答案

distroless 镜像基于 Debian 9,因此您可以进行多阶段构建并执行以下操作:

FROM debian AS build-env

# Add CA files
ADD my-ca-file.crt /usr/local/share/ca-certificates/my-ca-file.crt
RUN update-ca-certificates

FROM gcr.io/distroless/base
COPY --from=build-env /etc/ssl/certs /etc/ssl/certs

关于dockerfile - Docker distroless 镜像如何将自定义证书添加到信任存储?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52636213/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com