mystikos
mystikos copied to clipboard
Remove docker images after creation of appdir
When building an app using myst-appbuilder
left one docker image built in the disk, in small environments like mine, I can't store 2 big images.
It will be cool, if it doesn't exist, to have one flag for deleting the generated images using this command if don't need it.
Thanks for the suggestion. We keep the docker images in cache to speed up the next execution of appbuilder. But I agree a flag to remove the image is useful.
the problem is we dont always know what dependencies are going to be pulled down, and what is used by this current run or from some other docker usage on the machine. What if multiple things are using docker at the same time? It would be dangerous to delete used docker images. It is best to just go ahead and periodically purge all docker images from your machine. Something we should try and do it have all our docker images use the same base OS versions so we dont pull down 5 different versions of Alpine linux!
In my case, I suggest the feature because, in the testing process, I build like 1 image per hour at least, and a very small hard drive (in a vps), and images at least the first image(I use multi-stage builds), is big, so I need to delete each image every time I a going to run a test.
If we delete the docker images that we create in the process of myst-appbuild
, in cases like mine will be useful, and I think would not cause so much trouble, at the end isn't the default, just a feature that I can use and probably someone that build big images in small environments will appreciate
Add make option (something like APPBUILDER-CLEANUP-DOCKER-IMAGE_AFTER_EXPORT=1) that is passed through to appbuilder such that after export it deleted the docker image before continuing.