Mazzy
Mazzy

Reputation: 14189

x509 certificate signed by unknown authority - 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

However I get the following error:

Get https://api.pingdom.com/api/2.1/checks/0: x509: certificate signed by unknown authority

I've already tried what suggested here x509 certificate signed by unknown authority but without luck. Any ideas?

Upvotes: 4

Views: 7645

Answers (2)

Jed Huo
Jed Huo

Reputation: 11

add the following cmd to your Dockerfile can fix it.

FROM alpine:3.8

RUN apk update && apk add ca-certificates && rm -rf /var/cache/apk/*

Upvotes: 1

poy
poy

Reputation: 10507

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

You can also checkout GoogleContainerTools/distroless. It is minimal but has a few things like certs that make development life a little easier.

Upvotes: 8

Related Questions