1 | initial version |
One solution is to add the corporate root certificate to the Docker container's trust store. This can be achieved by:
Obtaining the corporate root certificate (often available from the IT department)
Creating a directory for the certificates in the Dockerfile:
RUN mkdir -p /usr/local/share/ca-certificates/corporate
Copying the root certificate into the directory:
COPY corporate-root.crt /usr/local/share/ca-certificates/corporate/
Note: replace "corporate-root.crt" with the actual name of the certificate file.
Updating the certificate trust store:
RUN update-ca-certificates
This will update the certificates in /etc/ssl/certs/ca-certificates.crt.
This will ensure that the root certificate is trusted by the Docker container and npm should no longer have issues obtaining the issuer certificate.