Permission denied update-ca-trust on openjdk18-openshift

Latest response

Hi,
i have pulled registry.redhat.io/redhat-openjdk-18/openjdk18-openshift, and i tried to add certificates using update-ca-trust. But i got error like this when

p11-kit: couldn't create file: /etc/pki/ca-trust/extracted/openssl/ca-bundle.trust.crt: Permission denied
etc....

How to add certificates in this docker images? any clue?

Thx.

Rudi.

Responses

Your Dockerfile should read:

FROM registry.redhat.io/redhat-openjdk-18/openjdk18-openshift

USER root
COPY certs/*.pem /etc/pki/ca-trust/source/anchors/
RUN update-ca-trust

USER 185