# Custom arm64 PostgreSQL 16 image with PostGIS 3 + TimescaleDB 2. # Based on the official postgres:16 image so POSTGRES_USER/DB/PASSWORD env # vars and host-auth (md5) work out of the box. Timescale's published # timescaledb-postgis image is amd64-only, so we install the extensions here. FROM postgres:16 # Install TimescaleDB + PostGIS from the respective apt repos. RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates curl gnupg lsb-release && \ curl -fsSL https://packagecloud.io/install/repositories/timescale/timescaledb/script.deb.sh | bash && \ apt-get update && apt-get install -y --no-install-recommends \ postgresql-16-postgis-3 timescaledb-2-postgresql-16 && \ mkdir -p /etc/postgresql/16/main/conf.d && \ echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \ rm -rf /var/lib/apt/lists/* # The official postgres entrypoint remains the CMD and handles # POSTGRES_USER / POSTGRES_DB / POSTGRES_PASSWORD and pg_hba setup.