Docker Layer Caching makes container run OOM




There seems to be a memory management issue while reusing containers - our container throws OOM (no space left on device) errors as soon as we start a build. My guess is that docker images are not removed from the cache and that we have reached the limit of the container.

It used to happen every now and then but we have been stuck with that for 24h.

Deactivating the layer caching fixes the issue.


This is with CircleCI 2.0?


Yes Circle 2.0 and Docker Layer Caching activated.


Can you run a build with layer caching enabled and these commands included?

docker ps -a
docker images

You may need to clear out the dangling images;

docker rmi $(docker images -q --filter "dangling=true")


Indeed I had to some docker clean up to do, my bad…

Thanks !