从 Docker C# 应用程序连接到 AWS DocumentDB 的证书错误

问题描述

我的 .net Core 应用程序在我的主机上运行并正常连接。

一旦从 docker 容器构建并运行,它就会失败并显示错误 System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

使用的 mongo 连接字符串 mongodb://user@xxxx.amazonaws.com/?ssl=true&ssl_ca_certs=rds-combined-ca-bundle.pem&replicaset=rs0&readPreference=secondaryPreferred&retryWrites=false&connectTimeoutMS=3000

当使用 RUN wget https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem -P /app

运行应用程序时,我已验证证书文件位于我的其余二进制文件所在的目录中

我还尝试使用容器内的 dotnet-certificate-tool 安装证书。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)