[英]AWS SES Error: x509: certificate signed by unknown authority
I've been banging my head against the table with this one for a while now.我用这个把头撞在桌子上已经有一段时间了。 I'm.
我是。 I've successfully sent emails locally using an AWS access key and secret that has full access.
我已经使用具有完全访问权限的 AWS 访问密钥和机密在本地成功发送了电子邮件。 Once I deploy to my staging environment I get an error using the same access key and secret.
部署到暂存环境后,使用相同的访问密钥和密码时会出现错误。
RequestError: send request failed\ncaused by: Post https://email.us-east-1.amazonaws.com/: x509: certificate signed by unknown authority
Please help!请帮忙!
If you are using alpine docker image
for example: 例如,如果您使用
alpine docker image
:
FROM alpine:3.6 as alpine
RUN apk add -U --no-cache ca-certificates
FROM scratch
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
After adding root certificates ca-certificates
, it will be working fine. 添加根证书
ca-certificates
,它将可以正常工作。
My project is deployed on Ubuntu machine and I am using Golang, so here is my Dockerfile.我的项目部署在 Ubuntu 机器上,我使用的是 Golang,所以这是我的 Dockerfile。
Please note that I have used COPY
command twice.请注意,我已经使用了两次
COPY
命令。 I successfully deployed my project and its working as expected.我成功部署了我的项目并按预期工作。
FROM golang:1.16.5 AS builderStep
# Install Certificate
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
FROM scratch AS app
# Copy Certificate
COPY --from=builderStep /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builderStep /my/source/code/ .
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.