Spaces:
Sleeping
Sleeping
Commit
·
4ff9e23
1
Parent(s):
3998fe4
changing ownership of dir
Browse files- Dockerfile +7 -4
Dockerfile
CHANGED
|
@@ -2,11 +2,14 @@ FROM postgres
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
-
RUN
|
| 6 |
-
RUN chmod
|
|
|
|
| 7 |
|
| 8 |
USER postgres
|
| 9 |
|
| 10 |
-
RUN ls -lh
|
| 11 |
|
| 12 |
-
EXPOSE 5432
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
USER root
|
| 4 |
|
| 5 |
+
RUN chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql
|
| 6 |
+
RUN chmod -R 775 /var/lib/postgresql /var/run/postgresql
|
| 7 |
+
RUN initdb
|
| 8 |
|
| 9 |
USER postgres
|
| 10 |
|
| 11 |
+
RUN ls -lh
|
| 12 |
|
| 13 |
+
EXPOSE 5432
|
| 14 |
+
|
| 15 |
+
CMD ["postgres"]
|