Share via

Evaluate environment from host before creating containers

Jeffrey K 171 Reputation points
2022-03-31T20:03:45.76+00:00

Im trying to create a deployment in IoTHub with the environment variable from the host set to the container environment variable. Is there a way to evaluate the environment variables from the host before setting the options for the container?

When I try to set the the container options Env say: [ "DISPLAY=$DISPLAY" ], the container running at the edge considers the env value $DISPLAY as string but does not evaluate them.

When I docker run the image manually I can see the value being evaluated before being set. eg: docker run -e DISPLAY=$DISPLAY hello-world

Any advice to achieve this through IoTEdge deployments?

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.


Your answer

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