Skip to content

Commit

Permalink
Volumes files have root owner when running docker with non-root user. -
Browse files Browse the repository at this point in the history
  • Loading branch information
pbacterio committed May 28, 2014
1 parent d27011c commit 2d7aad9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ RUN chmod +x /var/lib/postgresql/run
RUN pg_dropcluster 9.3 main
RUN pg_createcluster --locale en_US.utf8 9.3 main

USER postgres

# Allow remote connections
RUN echo "listen_addresses='*'" >> /etc/postgresql/9.3/main/postgresql.conf
RUN echo "host all all 0.0.0.0/0 md5" >> /etc/postgresql/9.3/main/pg_hba.conf

WORKDIR /var/lib/postgresql

RUN ls -l //var/lib/postgresql
RUN ls -l /var/lib/postgresql
RUN touch /var/lib/postgresql/first_run

USER postgres
WORKDIR /var/lib/postgresql

VOLUME ["/etc/postgresql", "/var/log/postgresql", "/var/lib/postgresql"]

EXPOSE 5432
Expand Down

0 comments on commit 2d7aad9

Please sign in to comment.