将路径安装到Azure IoT Edge模块 [英] Mount path to Azure IoT Edge module
问题描述
I followed the example from the documentation https://docs.microsoft.com/en-us/azure/iot-edge/how-to-develop-python-module and was playing around a bit.
我试图像在docker中那样将路径安装到IoT模块容器中,但未成功.我将以下内容添加到deployments.template.json中的createOptions中:
I tried to mount a path into the IoT module container like I would do in docker but I didn't succeed. I added the following to the createOptions in the deployments.template.json:
"createOptions": {
"Volumes": {
"D:\\test":"/test"
}
}
这将导致运行时响应:400-部署配置格式错误或无效.
This results in a RUNTIME RESPONSE: 400 - The deployment configuration is malformed or invalid.
我的问题:
- 是否有可能像在docker中那样安装从主机到IoTEdge模块的路径?
- 如果是,怎么办?
- 在哪里可以找到所有createOptions参数的引用?
推荐答案
是的,确实可以使用安装.您可以在SQL Server教程的创建选项中找到有关如何使用它们的示例:
Yes, it is indeed possible to use mounts. You can find an example of how to use them in the creation options in the SQL Server tutorial: https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-store-data-sql-server#add-a-sql-server-container
"createOptions": "{\"HostConfig\": {\"Mounts\": [{\"Target\": \"/var/opt/mssql\",\"Source\": \"sqlVolume\",\"Type\": \"volume\"}],\"PortBindings\": {\"1433/tcp\": [{\"HostPort\": \"1401\"}]}}}"
这篇关于将路径安装到Azure IoT Edge模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!