gcr.io/distroless/java
How to add custom pki certificate?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With