tls: failed to verify certificate: x509: certificate signed by unknown authority

2 years ago

I am learning Go by building a Discord bot and an API service.

I am getting the following error when deploying commands to Discord from the built container:

tls: failed to verify certificate: x509: certificate signed by unknown authority

I know very little about networking. Any pointers?

Repo:

5 Replies

2 years ago

a1f9ffe2-f62a-40c6-93ae-a31972cae7bb


2 years ago

I am using the scratch image. Maybe it is too scratch in this case?


2 years ago

Sidenote: Switching from scratch to golang:1.22-bookworm (same as my dev container), I get another error

1272660316475359200


2 years ago

This seems to do the trick

COPY --from=build /etc/ssl/certs /etc/ssl/certs

2 years ago

Considering this solved, but feel free to feedback


Loading...