【问题标题】:Error pulling edgeAgent from ACR with Windows container on IoT Edge v1.1在 IoT Edge v1.1 上使用 Windows 容器从 ACR 中提取 edgeAgent 时出错
【发布时间】:2021-04-26 18:01:36
【问题描述】:

我正在与使用 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"

【问题讨论】:

    标签: azure-iot-edge


    【解决方案1】:

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

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

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

    【讨论】:

    • 谢谢 Venkat,我会试一试的。请注意,一旦手动下载了 edgeAgent,IoT Edge 就能够下载 edgeHub。不允许不可分发的工件是否也会导致 edgeHub 出现问题?
    • 有没有办法更好地保护 ACR 凭证?我的客户不想将它们放在 config.yaml 中的开放文本中。例如,有没有办法使用环境变量来设置它们?
    • 目前唯一的方法是使用服务主体或令牌对容器注册表使用范围凭据(例如只读)。您也可以尝试使用“docker import”预加载 bootstrap edgeAgent 映像。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-01-03
    • 2019-10-31
    • 1970-01-01
    • 2021-09-10
    • 2019-06-26
    相关资源
    最近更新 更多