I have been trying to deploy an IoT Edge module to my IoT Edge device using the following link:
https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-deploy-function
Everything appears to be working fine, however, when I right-click the deployment.template.json file and select Build IoT Edge solution I get the following output:
PS C:\Users\Carlton\Documents\OnAzureFunction\EdgeSolutionAF> docker build --rm -f "c:\Users\Carlton\Documents\OnAzureFunction\EdgeSolutionAF\modules\edgeonAzureF\Dockerfile.amd64" -t carlscontainer.azurecr.io/edgeonazuref:0.0.1-amd64 "c:\Users\Carlton\Documents\OnAzureFunction\EdgeSolutionAF\modules\edgeonAzureF" ; if ($?) { docker push carlscontainer.azurecr.io/edgeonazuref:0.0.1-amd64 } Sending build context to Docker daemon 12.29kB Step 1/3 : FROM mcr.microsoft.com/azureiotedge-functions-binding:1.0.0-linux-amd641.0.0-linux-amd64: Pulling from azureiotedge-functions-bindingimage operating system "linux" cannot be used on this platformPS C:\Users\Carlton\Documents\OnAzureFunction\EdgeSolutionAF>
As you can see Step 1/3 appears to fail.
What should happen is visual Studio Code first takes the information in the deployment template and generates a deployment.json file in a new config folder. Then it runs two commands in the integrated terminal: docker build and docker push. These two commands build your code, containerize the functions, and the push it to the container registry that you specified when you initialized the solution. However, as you can the docker push does not send it to the container registry.