We’re running a docker-in-docker setup, and we’re first sending devices into a staging environment (i.e. Application), and then graduating them to the production application by “moving” them into that app.
Because of the way the data partition is mounted into the application, our docker image cache can not be reused by different applications after moving, so each app causes the full set of docker images to be built or downloaded - which is around 3GB worth of data.
The way purge seems to work, is that it only purges the data for the current app, this is evidenced by the following device, which was purged a couple of hours ago, but still has data from “old” apps stored:
root@efd141c:/mnt/data/resin-data# ls -ltrh
drwx–x--x 11 root root 4.0K Apr 9 14:42 310575
drwx–x--x 10 root root 4.0K Apr 20 20:39 198163
drwxr-xr-x 2 root root 4.0K Apr 21 10:41 345894
drwx–x--x 11 root root 4.0K Apr 30 09:19 278971
drwx–x--x 11 root root 4.0K May 12 08:29 155867
drwxr-xr-x 2 root root 4.0K May 12 09:35 resin-supervisor
If there was a hook on “move app”, then we could delete our local docker cache before the move happens, which would at least free up the ~3gb image cache. In order to do this with the current purge function, we’d have to purge the data, and then quickly move the App before anything further is downloaded - which doesn’t really seem like a very clean approach.
Thanks for the feedback