Would like to understand about the key IOTEDGE_APIVERSION in docker inspect output.

Arjun Sivasree 25 Reputation points
2024-01-30T14:00:35.49+00:00

I have a module running as part of azure iot edge and upon docker inspect of the module, I find key IOTEDGE_APIVERSION has a value 2020-07-07

"Env": [
                "IOTEDGE_APIVERSION=2020-07-07",
                "IOTEDGE_AUTHSCHEME=xxxx",
                "IOTEDGE_DEVICEID=xxxx",
                "IOTEDGE_GATEWAYHOSTNAME=xxxx",
                "IOTEDGE_IOTHUBHOSTNAME=xxxx",
                "IOTEDGE_MODULEGENERATIONID=xxxx",
                "IOTEDGE_MODULEID=sampleModule",
                "IOTEDGE_WORKLOADURI=unix:///var/run/iotedge/workload.sock",
                "RuntimeLogLevel=Information",
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "ASPNETCORE_URLS=http://+:80",
                "DOTNET_RUNNING_IN_CONTAINER=true",
                "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true",
                "DOTNET_VERSION=6.0.22",
                "ASPNET_VERSION=6.0.22"
            ],

I would like to understand how that value is decided and can that be controlled by the user, since it is a custom module.

I did try adding it as a ENV variable in the deployment manifest but it failed with an error that it is a duplicate key.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
576 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 33,146 Reputation points MVP
    2024-01-30T17:24:01.56+00:00

    Hello @Arjun Sivasree,

    welcome to this moderated Azure community forum.

    I have see the same list of environment variables when I use this handy echo module.

    Your custom module is based on a dotnet module (as seen in the 'Dockerfile' you use)

    FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env

    This base layer introduces those environment variables.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.