由未知授权机构签名的x509证书-Go-pingdom [英] x509 certificate signed by unknown authority - go-pingdom
问题描述
我正在使用Go包 pingdom-go
查询Pingdom.该应用程序的容器化方式如下:
I'm using the Go package pingdom-go
to query Pingdom. The application is containerized as this:
FROM alpine:3.8
USER nobody
ADD build/_output/bin/app /usr/local/bin/app
但是我遇到以下错误:
Get https://api.pingdom.com/api/2.1/checks/0: x509: certificate signed by unknown authority
我已经尝试过这里的建议由未知授权机构签名的x509证书但没有运气.有什么想法吗?
I've already tried what suggested here x509 certificate signed by unknown authority but without luck. Any ideas?
推荐答案
因此, alpine
容器非常小,包括没有证书.您可以安装@TimCooper建议的证书:
So the alpine
containers are very minimal, including not having certs. You can either install the certs like @TimCooper suggested:
apk add --no-cache ca-certificates
您还可以结帐 GoogleContainerTools/distroless .它虽然很小,但是具有一些诸如certs之类的东西,使开发工作变得更加轻松.
You can also checkout GoogleContainerTools/distroless. It is minimal but has a few things like certs that make development life a little easier.
这篇关于由未知授权机构签名的x509证书-Go-pingdom的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!