Docker Distroless Image如何向信任库添加自定义证书?

时间:2018-10-03 21:53:25

标签: dockerfile google-container-os

gcr.io/distroless/java

如何添加自定义pki证书?

1 个答案:

答案 0 :(得分:0)

非发行版映像基于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