I’m aware how to cache dependencies in CircleCI:
- restore_cache:
keys:
- my-project-v1-{{ checksum "project.clj" }}
# fallback to using the latest cache if no exact match is found
- my-project-v1
- run: lein with-profile test deps
- save_cache:
paths:
- ~/.m2
key: my-project-v1-{{ checksum "project.clj" }}
I’m also aware how to use docker-compose
:
- run:
name: Install Docker Compose
command: |
curl -L https://github.com/docker/compose/releases/download/1.24.0/docker-compose-`uname -s`-`uname -m` > ~/docker-compose
chmod +x ~/docker-compose
sudo mv ~/docker-compose /usr/local/bin/docker-compose
- run: docker-compose up -d
However, every time the job runs docker-compose up -d
, it downloads the images, specified in the docker-compose.yml
file. Is there a way to make CircleCI download them once and then use them (until docker-compose.yml
is modeified)?