Azure物联网边缘模块: Error while Build and Push IoT Edge Solution

标签 azure docker azure-iot-hub azure-iot-edge azure-container-registry

我一步步按照本教程操作:https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-c-module

但是在“构建并推送您的解决方案”(https://learn.microsoft.com/en-us/azure/iot-edge/tutorial-c-module#build-and-push-your-solution)步骤中,我在终端中出现以下错误:

standard_init_linux.go:207: exec user process caused "no such file or directory"

我检查了教程中列出的 3 点(“如果您在尝试构建和推送模块时收到错误”),但错误仍然存​​在。

我什至不知道它是什么文件..

有人知道这个问题吗?

谢谢

编辑

我添加所有终端输出:

Sending build context to Docker daemon    106kB
Step 1/14 : FROM arm32v7/ubuntu:xenial AS base
 ---> 8593318db04f
Step 2/14 : RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common && add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && apt-get update && apt-get install -y azure-iot-sdk-c-dev && rm -rf /var/lib/apt/lists/*
 ---> Running in 8bed4f396527
standard_init_linux.go:207: exec user process caused "no such file or directory"
The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends software-properties-common && add-apt-repository -y ppa:aziotsdklinux/ppa-azureiot && apt-get update && apt-get install -y azure-iot-sdk-c-dev && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 1

最佳答案

看起来在中间 docker 镜像中找不到命令中的路径之一。尝试使用以下命令直接在中间镜像上运行 shell:

docker run -it --entrypoint sh 8593318db04f

检查/var/lib/apt/lists//bin/sh是否确实存在于图像上。您应该能够手动运行 docker 文件中指定的命令。

我发现这对于调试失败的 docker 构建非常有帮助。

关于Azure物联网边缘模块: Error while Build and Push IoT Edge Solution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54672249/

相关文章:

azure - 检索 Azure(辅助角色)角色的 DNS URL

php - Azure GitHub 部署问题

c - 在 Eclipse 中使用适用于 C 的 Azure IoT 插件

azure - Microsoft Azure Iot Hub 中的分区有什么作用?

json - azure 中带有点/句点的嵌套 JSON 路径

azure - Azure 应用服务间歇性 503.64 响应

c# - Azure 身份验证 Web 应用本地主机回复 url

mysql - 是否可以在 Dockerfile/Docker-Compose 中使用提交的容器镜像?

docker - 如何使用 dotnet sdk linux docker 镜像和从 Windows 10 安装的卷运行 dotnet restore?

docker - 带有重定向命令的Dockerfile “RUN echo”导致文件名困惑