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