I am currently utilizing Puppeteer inside a Docker container to access a website secured with a custom SSL certificate. Here are the configuration steps I have followed:
- I installed
google-chrome-stable
in my Docker image following the guidelines found in the Puppeteer documentation. - I placed my certificates in the directory
/usr/local/share/ca-certificates
inside the Docker container. - Next, I directed Puppeteer to use the installed Google Chrome instance through the launch command:
await puppeteer.launch({ executablePath: '/usr/bin/google-chrome' })
- I then made an attempt to visit my webpage with:
await page.goto('https://my-page-url')
Nevertheless, upon executing this code within the Docker setup, I encounter the following error:
net:ERR_CERT_AUTHORITY_INVALID at https://my-page-url
This error suggests that Chrome fails to validate the SSL certificate for the destination site. What steps can I take to resolve this issue? I am aware of options like --ignore-certificate-errors
, but I prefer to have Chrome connect successfully without bypassing the certificate verification.