The process should not run as root in docker(#1267)

This commit is contained in:
Tobias Flühmann
2019-04-04 10:38:11 -05:00
committed by Steve Chávez
parent cefbe8f07f
commit fe56029f61
+6
View File
@@ -39,6 +39,12 @@ ENV PGRST_DB_URI= \
PGRST_PRE_REQUEST= \
PGRST_ROLE_CLAIM_KEY=".role"
RUN groupadd -g 1000 postgrest && \
useradd -r -u 1000 -g postgrest postgrest && \
chown postgrest:postgrest /etc/postgrest.conf
USER 1000
# PostgREST reads /etc/postgrest.conf so map the configuration
# file in when you run this container
CMD exec postgrest /etc/postgrest.conf