File size: 431 Bytes
9647270 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# Use the official PostgreSQL image as the base image
FROM postgres:13
# Set the environment variables for the PostgreSQL database
ENV POSTGRES_DB=mydb
ENV POSTGRES_USER=myuser
ENV POSTGRES_PASSWORD=mypassword
# Copy any custom SQL scripts to the container
COPY init.sql /docker-entrypoint-initdb.d/
# Expose the default PostgreSQL port
EXPOSE 5432
# Start the PostgreSQL server when the container is launched
CMD ["postgres"]
|