微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 IoT Edge v1.1 上使用 Windows 容器从 ACR 中提取 edgeAgent 时出错

如何解决在 IoT Edge v1.1 上使用 Windows 容器从 ACR 中提取 edgeAgent 时出错

我正在与一位使用带有 Windows 容器的 IoT Edge v1.1 的客户合作。他们处于锁定环境中,不想连接到公共容器注册表。他们更喜欢从自己的 Azure 容器注册表 (ACR) 中提取。我们已使用 az acr import 从公共注册表中将 edgeAgent 和 edgeHub 复制到 ACR 以从以下位置提取容器:

  • mcr.microsoft.com/azureiotedge-agent:1.1
  • mcr.microsoft.com/azureiotedge-hub:1.1

我发现 Azure IoT Edge 无法下载 edgeAgent 映像。如果我从 ACR 手动下载 edgeAgent 容器,edgeAgent 将正确启动。 edgeAgent 还可以通过 ACR 下载和安装 edgeHub。例如:

docker -H "npipe:////./pipe/iotedge_moby_engine" pull <private ACR>.azurecr.io/azureiotedge-agent:1.1

有没有想过为什么 IoT Edge 本身无法拉取镜像?我的 edgeAgent config.yaml 配置有问题吗?

agent:
  name: "edgeAgent"
  type: "docker"
  env: {}
  config:
    image: "<private ACR>.azurecr.io/azureiotedge-agent:1.1"
    auth:
      username: "<username>"
      password: "<key>"
      serveraddress: "<address>.azurecr.io"

解决方法

allow-nondistributable-artifacts 可能是必需的。请看

请注意,docker 守护进程需要此设置推送公共映像到私有注册表,而不是 IoT Edge 设备本身。

如果这没有帮助,我建议在 https://github.com/azure/iotedge/issues 打开一个问题,并确保包含来自 iotedged 服务的日志。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。