Caching docker image on CircleCI

At BKNO3 we use Docker and docker-compose for development, in order to make sure every developer can easily and reliably set up a development environment locally, even if they're not familiar with the project itself (we have several components, with different developers working on each one).

The same docker containers are used to run continuous integration (on CircleCI) as well, in order to reduce the differences between the dev/ci/prod environments.

A big pain in doing so, however, was the time spent rebuilding the whole docker image every time the test suite was run, even if nothing changed ...

PostGIS on Gitlab-CI

It took me a while to figure out how to setup postgis on a gitlab-ci build, and could not find anything on the docs, so here is a brief explanation of what I did:

First of all, I used mdillon/postgis as a base image for the service, to avoid having to install postgis on the postgres:9.4 base image over and over.

Using custom docker images as services is explained on the Using Docker Images page of the official guide.

But in short, all I had to do is make a few following changes to .gitlab-ci.yml:

services ...

Page 1 / 1