This images is built from the official postgres docker image, but with
updates to optimize the test execution:
- A config file for postgres to increase the performance of the
test server.
- An initialization script to create a template database with all
migrations run against it.
There are new make targets to build and publish this docker image.
The image can be pulled with:
docker pull hashicorpboundary/postgres:13-alpine
To use this image for tests start the container:
make -C internal/db/docker database-up
7 lines
202 B
Docker
7 lines
202 B
Docker
FROM postgres:alpine
|
|
|
|
ADD init-db.sh /docker-entrypoint-initdb.d/00-init-db.sh
|
|
ADD postgresql.conf /etc/postgresql/postgresql.conf
|
|
|
|
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
|