Closed dsschneidermann closed 11 months ago
@microsoft-github-policy-service agree
you can always customize the docker files after the project has been generated from the template.
What's the use case of installing curl?
Oh, sorry that was not really clearly described. The problem fixed here is that the .debug
Dockerfiles come with no debugging tools installed.
The problem is further obstructed by those Dockerfiles that pipe the result of a failing curl
attempt into bash, which then doesn't fail the build for those files. But curl isn't installed, so in the end we end up deploying 'debug' versions that can't debug anything.
I see.. however I think that method to debug containers is a bit outdated.
Visual Studio is able to acquire, deploy and use vsdbg automagically, see https://learn.microsoft.com/en-us/troubleshoot/developer/visualstudio/ide/troubleshooting-docker-errors?view=vs-2022
@marianan this might be a good time to update the docker support in this template.
From https://learn.microsoft.com/en-us/azure/iot-edge/debug-module-vs-code
Debug a module with the IoT Edge runtime
In each module folder, there are several Docker files for different container types. Use any of the files that end with the extension .debug to build your module for testing.
The docs are suggesting that these files should work out of the box. We ran into the issue that it doesn't work without the debugger tools installed. This PR fixes that for other people who want to follow documentation and get stuff working.
Or I guess you can remove the files so that noone can follow the documentation. Okay, closing this.
To use
RUN curl
the layer must havecurl
installed first. When piping the result of acurl
tobash
, any errors from the first part is silently dropped, and in the end you produce a container that doesn't have the advertised feature.