2026-07-07 18:00:45 -04:00
|
|
|
# Custom arm64 PostgreSQL 16 image with PostGIS 3 + TimescaleDB 2.
|
2026-07-07 18:13:40 -04:00
|
|
|
# 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
|
2026-07-07 18:00:45 -04:00
|
|
|
|
2026-07-07 18:13:40 -04:00
|
|
|
# Install TimescaleDB + PostGIS from the respective apt repos.
|
2026-07-07 18:00:45 -04:00
|
|
|
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 \
|
2026-07-07 18:13:40 -04:00
|
|
|
postgresql-16-postgis-3 timescaledb-2-postgresql-16 && \
|
2026-07-07 18:17:31 -04:00
|
|
|
mkdir -p /etc/postgresql/16/main/conf.d && \
|
2026-07-07 18:13:40 -04:00
|
|
|
echo "shared_preload_libraries = 'timescaledb'" > /etc/postgresql/16/main/conf.d/timescaledb.conf && \
|
2026-07-07 18:00:45 -04:00
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-07-07 18:13:40 -04:00
|
|
|
# The official postgres entrypoint remains the CMD and handles
|
|
|
|
|
# POSTGRES_USER / POSTGRES_DB / POSTGRES_PASSWORD and pg_hba setup.
|