# Use pgvector with Postgres 17 as the base image FROM pgvector/pgvector:pg17 USER postgres # Set environment variable for PostgreSQL password and data directory ENV POSTGRES_PASSWORD=postgres ENV PGDATA=/data/postgresql # Create and configure the data directories RUN mkdir -p /data/postgresql && \ chown -R postgres:postgres /data && \ chmod 777 /data && \ chmod 700 /data/postgresql # Expose PostgreSQL port EXPOSE 5432