Docker image too large for cache?

I’m wondering if there’s a max size to directory caching? I’m noticing my docker state is saving (being written to ~/docker), but not persisting in cache (following builds have an empty ~/docker directory). The resulting container is about 1.4GB. Here’s the relevant section of config:

- “~/docker”
- if [[ -e ~/docker/system.tar ]]; then docker load --input ~/docker/system.tar; fi
- if [[ -e ~/docker/full.tar ]]; then docker load --input ~/docker/full.tar; fi
- mkdir -p ~/docker
- docker info
- docker build -t system:latest tools/docker/system:
timeout: 10800
- docker save system:latest > ~/docker/system.tar
- docker build -t full:latest .:
timeout: 10800
- docker save full:latest > ~/docker/full.tar

1 Like

You can check this link Docker Cache

And i think CircleCI’s caching is not work. I got same problem with you

Thanks @huytran

The work around works and this is a non-issue.

Dependency caching happens much later than expected. It doesn’t happen directly after the dependencies step AFAIK. If the full build completes, the docker container is cached.