Docker Compose : build with docker –rm –force-rm to avoid storing intermediates
I have low memory so I frequently need to delete containers, which sucks.
This github issue https://github.com/docker/docker/issues/11154 is raised by a guy who has the same constraints and is being suggested to use
docker --rm --force-rm build
Can I do the same with docker-compose? How?
The CLI usage doesn’t seem to accept:
docker-compose --rm --force-rm build
One Solution collect form web for “Docker Compose : build with docker –rm –force-rm to avoid storing intermediates”
As someone has commented, adding these parameters probably isn’t going to accomplish much for you. Compose already defaults to
What you might want to do instead is run something like https://github.com/yelp/docker-custodian with a very short “max age”. That way you’ll remove any old container and images soon after they exit.