Training
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to: IoT Edge 1.5
Important
IoT Edge 1.5 LTS is the supported release. IoT Edge 1.4 LTS is end of life as of November 12, 2024. If you are on an earlier release, see Update IoT Edge.
The module.json file controls how modules are built and deployed. IoT Edge module Visual Studio and Visual Studio Code projects include the module.json file. The file contains IoT Edge module configuration details including the version and platform that is used when building an IoT Edge module.
The module.json file includes the following settings:
Setting | Description |
---|---|
image.repository | The repository of the module. |
image.tag.version | The version of the module. |
image.tag.platforms | A list of supported platforms and their corresponding dockerfile. Each entry is a platform key and dockerfile pair <platform key>:<dockerfile> . |
image.buildOptions | The build arguments used when running docker build . |
image.contextPath | The context path used when running docker build . By default, it's the current folder of the module.json file. If your Docker build needs files not included in the current folder such as a reference to an external package or project, set the contextPath to the root path of all necessary files. Verify the files are copied in the dockerfile. |
language | The programming language of the module. |
For example, the following module.json file is for a C# IoT Edge module:
{
"$schema-version": "0.0.1",
"description": "",
"image": {
"repository": "localhost:5000/edgemodule",
"tag": {
"version": "0.0.1",
"platforms": {
"amd64": "./Dockerfile.amd64",
"amd64.debug": "./Dockerfile.amd64.debug",
"arm32v7": "./Dockerfile.arm32v7",
"arm32v7.debug": "./Dockerfile.arm32v7.debug",
"arm64v8": "./Dockerfile.arm64v8",
"arm64v8.debug": "./Dockerfile.arm64v8.debug",
"windows-amd64": "./Dockerfile.windows-amd64"
}
},
"buildOptions": ["--add-host=docker:10.180.0.1"],
"contextPath": "./"
},
"language": "csharp"
}
Once the module is built, the final tag of the image is combined with both version and platform as
<repository>:<version>-<platform key>
. For this example, the image tag for amd64.debug
is
localhost:5000/csharpmod:0.0.1-amd64.debug
.
Understand the requirements and tools for developing IoT Edge modules
Training
Certification
Microsoft Certified: Azure Developer Associate - Certifications
Build end-to-end solutions in Microsoft Azure to create Azure Functions, implement and manage web apps, develop solutions utilizing Azure storage, and more.
Documentation
Write createOptions for modules - Azure IoT Edge
How to use createOptions in the deployment manifest to configure modules at runtime
Use Azure IoT Edge device local storage from a module
Use environment variables and create options to enable module access to IoT Edge device local storage.
Debug Azure IoT Edge modules using Visual Studio Code
Use Visual Studio Code to debug an Azure IoT Edge custom module written in a supported development language.