Docker distroless image how to add customize certificate to trust store?

限于喜欢 提交于 2020-12-29 16:44:26

问题


gcr.io/distroless/java

How to add custom pki certificate?


回答1:


The distroless images are based on Debian 9, so you can do a multi-stage build and do something like the following:

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


来源:https://stackoverflow.com/questions/52636213/docker-distroless-image-how-to-add-customize-certificate-to-trust-store

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!