14 lines
345 B
Docker
14 lines
345 B
Docker
# Use the official PostgreSQL image as the base image
|
|
FROM postgres:latest
|
|
|
|
# Set environment variables for PostgreSQL
|
|
ENV POSTGRES_DB=mydatabase
|
|
ENV POSTGRES_USER=myuser
|
|
ENV POSTGRES_PASSWORD=mypassword
|
|
|
|
# Copy initialization scripts into the Docker image
|
|
COPY init.sql /docker-entrypoint-initdb.d/
|
|
|
|
# Expose the PostgreSQL port
|
|
EXPOSE 5432
|