diff docker/Dockerfile.db @ 4878:3fc3f1ed8531

Fix build for restrictive UMASK on host Building a database image failed due to insufficient permissions for the postgres user to read and execute files transfered with COPY from the host if these files did not have the necessary file modes set for all users, because files are owned by root by default.
author Tom Gottfried <tom@intevation.de>
date Mon, 27 Jan 2020 15:49:55 +0100
parents a6f18b3ccab1
children
line wrap: on
line diff
--- a/docker/Dockerfile.db	Fri Jan 24 17:33:12 2020 +0100
+++ b/docker/Dockerfile.db	Mon Jan 27 15:49:55 2020 +0100
@@ -34,10 +34,10 @@
 # Expose the PostgreSQL port
 EXPOSE 5432
 
-# Create GEMMA role and database
+# Create GEMMA roles and database
 WORKDIR /opt/gemma
-COPY schema/*.sql schema/*.sh ./
-COPY schema/demo-data ./demo-data/
+COPY --chown=postgres schema/*.sql schema/*.sh ./
+COPY --chown=postgres schema/demo-data ./demo-data/
 RUN $PGBIN/pg_ctl start -wo "--config_file=$PGCONF" && \
     ./install-db.sh --demo --metapw "geo2Serv" && \
     $PGBIN/pg_ctl stop -m smart