If anyone has done any development on, or run in production for a while, an IoT Edge box, inevitably they have a lot of unused docker images ‘hanging’ around on their IoT Edge boxes, just being bums and eating up disk space. This can happen particularly if you’ve developed your own custom modules and released new versions over time, with new docker image tags over time, as shown below for the ‘echomodule’ module (click on it for clearer view)
A frequent question we get from customers is “will IoT Edge clean up these unused images?”. The answer is, well… “no”. There are suggestions we’ve seen around maybe using cron jobs and such to schedule a ‘docker image prune’ run to remove them, but I wanted to see if I could do this as an IoT Edge module itself, so you don’t have to fool with OS-level config and can run/configure it remotely.
The short version is: yep! (you probably guessed that since I wrote this post, right? you’re pretty clever)
The longer version can be found at our Azure IoT GBB (my team)’s github site here –> IoT Edge Image Cleanup
Enjoy and as always, let me know what you think…
–Steve