I use follows in circle.yml
to install MongoDB:
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
- echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
- sudo apt-get update
- sudo apt-get install -y mongodb-org
- sudo apt-get autoremove
- sudo service mongod restart
How can I cache it to avoid the installation every time?