I currently have a base image (ubuntu + node + some core dependencies) that is 4GB large and takes about 3.5min~ to pull from dockerhub. I’m trying to speed this up because that’s an incredible amount of resources and time needed in order to run simple unit tests against my application.
Is there any way circle can cache the base image so the image doesn’t have to be downloaded on every build?
Another alternative is to use docker layer caching inside circleci, but it seems a bit backwards. Basically what i’d do in circleci is:
- run a base ubuntu machine
- checkout code
- run dockerfile and build image (this caches the image layers for future builds on the same branch)
- take latest image and run it in a container
- inside the container(which has all my dependencies), checkout code and run tests
I would prefer not to do this alternative. Please advise!