This image is designed to supercede the legacy CircleCI PostgreSQL image, circleci/postgres
.
cimg/postgres
is a Docker image created by CircleCI with continuous integration builds in mind.
This image can be used with the CircleCI docker
executor as a secondary image.
For example:
1
2
3
4
5
6
7
jobs:
build:
docker:
- image: cimg/go:1.17
- image: cimg/postgres:17.0.0
steps:
- checkout
In the above example, the CircleCI Go Docker image is used for the primary container while the PostgreSQL image is used as a secondary.
More specifically, the tag 13.2
is used meaning the version of PostgreSQL will be v13.2.
You can now connect to a PostgreSQL instance from the primary image within the steps for this job.
This image contains the PostgreSQL database and its complete toolchain.
This image has the following tagging scheme:
cimg/postgres:<pg-version>[-variant]
<pg-version>
- The version of PostgreSQL to use.
[-variant]
- a variant tag can optionally be added.
The available variants can be found below.
Variant images typically contain the same base software, but with a few additional modifications.
The PostGIS variant is the same PostgreSQL image but with PostGIS (and its several dependencies) pre-installed.
The PostGIS variant can be used by appending -postgis
to the end of an existing cimg/postgres
tag.
1
2
3
4
5
6
7
8
jobs:
build:
docker:
- image: cimg/go:1.17
- image: cimg/postgres:17.0.0-postgis
steps:
- checkout
- run: echo "Do things"
The legacy version of this image, circleci/postgres
had a RAM variant.
This is no longer the case.
We're determining how much of a performance increase does this variant actually give before we decide to bring it back.
If you used the legacy PostgreSQL image and you have data on the ram vs non-ram variant build times, please open a GitHub Issue and let us know.