更新:显然,当启用Microsoft Azure AD时会发生错误。
我的Docker镜像基于Debian slim。(更新:即使基于Alpine的图像也有此错误)
FROM node:18-slim
...
RUN apt-get update && apt-get install --yes ca-certificates
即使使用ca-certificates
,也会出现以下错误:
2023-05-17T11:33:13.888836835Z ./containerlaunch.sh: line 6: update-ca-certificates: command not found
2023-05-17T11:33:13.898826553Z Updated CA certificates
2023-05-17T11:50:14.463204566Z ./containerlaunch.sh: line 6: update-ca-certificates: command not found
2023-05-17T11:50:14.486848458Z Updated CA certificates
2023-05-17T11:50:54.115862067Z ./containerlaunch.sh: line 6: update-ca-certificates: command not found
2023-05-17T11:50:54.119680808Z Updated CA certificates
局部工作良好;仅在Azure应用服务中,我遇到了此错误。会是什么呢?
1条答案
按热度按时间5f0d552i1#
很可能是安装在基础映像中的证书有问题。分别运行以下命令:
1.验证日期/时间设置是否正确
1.运行
sudo apt-get update
1.运行
sudo apt-get install ca-certificates
如果这不起作用,请执行以下操作:
1.禁用证书:将
Acquire { https::Verify-Peer false }
添加到/etc/apt/conf.d/
1.运行
sudo apt-get update
1.运行
sudo apt-get install ca-certificates
1.通过删除
Acquire { https::Verify-Peer false }
重新启用证书验证这个应该能用我希望它有帮助!