Spaces:
Sleeping
Sleeping
Commit
·
ba93ae4
1
Parent(s):
4ff9e23
changes
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
|
@@ -2,13 +2,12 @@ FROM postgres
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
RUN chown -R postgres:postgres /
|
| 6 |
-
RUN chmod -R 775 /var/lib/postgresql /var/run/postgresql
|
| 7 |
-
RUN initdb
|
| 8 |
|
| 9 |
USER postgres
|
| 10 |
|
| 11 |
-
|
|
|
|
| 12 |
|
| 13 |
EXPOSE 5432
|
| 14 |
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
RUN mkdir -p /custom_pgdata && chown -R postgres:postgres /custom_pgdata
|
|
|
|
|
|
|
| 6 |
|
| 7 |
USER postgres
|
| 8 |
|
| 9 |
+
ENV PGDATA=/custom_pgdata
|
| 10 |
+
RUN initdb -D /custom_pgdata
|
| 11 |
|
| 12 |
EXPOSE 5432
|
| 13 |
|