Mount path to Azure IoT Edge module

送分小仙女□ 提交于 2019-12-07 19:00:03

问题


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.

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"
    }
}

This results in a RUNTIME RESPONSE: 400 - The deployment configuration is malformed or invalid.

My questions:

  • Is it even possible to mount a path from the host to IoTEdge modules like one would do in docker?
  • If yes, how?
  • Where can I find a reference of all the createOptions arguments?

回答1:


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\"}]}}}"



来源:https://stackoverflow.com/questions/52572289/mount-path-to-azure-iot-edge-module

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!