I followed the example from the documentation https://learn.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:
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://learn.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\"}]}}}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With