Mercurial > gemma
changeset 173:2b04de578be0
Use COPY in a way that allows replacing by a volume
Before, a volume added as shown in the README actually
duplicated the files.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Thu, 12 Jul 2018 17:42:31 +0200 |
parents | a422471db08a |
children | 68fd656c3d55 |
files | schema/Dockerfile |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/schema/Dockerfile Thu Jul 12 16:30:01 2018 +0200 +++ b/schema/Dockerfile Thu Jul 12 17:42:31 2018 +0200 @@ -25,15 +25,16 @@ EXPOSE 5432 # Create GEMMA role and database -COPY *.sql ./ -COPY demo-data/*.sql ./ +WORKDIR /opt/gemma +COPY *.sql *.sh ./ +COPY demo-data ./demo-data/ RUN $PGBIN/pg_ctl start -wo "--config_file=$PGCONF" && \ psql -f roles.sql && \ createdb gemma && \ psql -f gemma.sql -d gemma && \ psql -f auth.sql -d gemma && \ - psql -f users.sql -d gemma && \ - psql -f responsibility_areas.sql -d gemma && \ + psql -f demo-data/users.sql -d gemma && \ + psql -f demo-data/responsibility_areas.sql -d gemma && \ $PGBIN/pg_ctl stop -m smart # Set the default command to run when starting the container