公式イメージのPostgreSQL 15に pg_bigm v1.2 をインストールしたDocker Imageです。
symdit/postgresql15-bigm - Docker Hub
docker pull symdit/postgresql15-bigm
create docker-compose.yml
file like this
version: '3.9'
services:
db:
image: symdit/postgresql15-bigm
restart: always
container_name: postgresql15-bigm
ports:
- '5433:5432'
volumes:
- ./script:/docker-entrypoint-initdb.d
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: tests
PGDATA: /var/lib/postgresql/data/pgdata
docker-compose up -d
script
配下にsqlファイルを置くと、コンテナ立ち上げ後に任意のSQLを実行することができます。