5.2. 使用 Containerfile 将自定义证书导入到镜像中
包含使用 Containerfile 安装自定义证书根的指令。
流程
创建
Containerfile:FROM <internal_repository>/<image> # Add certificate to the input set of anchors COPY additional-certificate-root.pem /etc/pki/ca-trust/source/anchors RUN update-ca-trust构建自定义镜像:
# podman build -t <your_image> .运行
<your_image>:# podman run -it --rm <your_image>
验证
验证您的证书是否在生成的合并存储中:
# cat etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem ...