Reputation: 1024
Why when I build an image from a docker-file and the build process fails, the memory used in the process is not being freed. I'm using Ubuntu 16.04
And is not appearing as an image, because it fails to be created. Where, then the data is being accumulated?
Thank you, please If you need more information ask me.
UPDATE: Some zombie images starting appearing after some time. UPDATE 2: Those zombie images and containers (?) somehow are the failed builds... if anyone has more information of what is going on, please share it with me.
Upvotes: 0
Views: 3791
Reputation: 71
Run it:
docker builder prune --all -f
By default it make following: Remove all unused build cache from previous build process
Upvotes: 7
Reputation: 51876
Docker by default doesn't clean up useless images know as "dangling images". It provides however the following command to safely clean them.
docker image prune
Alternatively, you can pass the following argument to docker build to force cleanup.
--force-rm Always remove intermediate containers
Upvotes: 3