File size: 561 Bytes
8544e5e c2791bd 8544e5e d525f33 8544e5e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Use the official PostgreSQL image from the Docker Hub
FROM postgres:latest
# Environment variables for PostgreSQL setup
ENV POSTGRES_DB='mydatabase'
ENV POSTGRES_USER='myuser'
ENV POSTGRES_PASSWORD='mypassword'
# Copy the custom PostgreSQL configuration file
COPY postgresql.conf ./postgresql.conf
# Copy initialization scripts to the Docker container
COPY init.sql /docker-entrypoint-initdb.d/
# Expose the custom port
EXPOSE 7860
# Run PostgreSQL with the custom configuration file
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
|