osint-dashboard/Dockerfile.pg
2026-07-07 18:13:40 -04:00

18 lines
1.1 KiB
Text

# 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 && \
# Load TimescaleDB at startup via a drop-in (keeps official entrypoint intact).
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.