When attempting to query Pingdom via the Go package pingdom-go, errors may arise if the Alpine container lacks the necessary certificates. This issue manifests through the error message: "Get https://api.pingdom.com/api/2.1/checks/0: x509: certificate signed by unknown authority".
To resolve this problem, several approaches can be considered:
Install Certificates:
As suggested by @TimCooper, installing certificates on the Alpine container can resolve the issue. This can be achieved by running the following command:
apk add --no-cache ca-certificates
Utilize GoogleContainerTools/distroless:
Alternatively, consider using the GoogleContainerTools/distroless image. While also minimal, it includes essential components such as certificates, making development more seamless.
The above is the detailed content of How to Fix \'x509 certificate signed by unknown authority\' Error When Querying Pingdom with Pingdom-Go?. For more information, please follow other related articles on the PHP Chinese website!