Search code examples
postgresqldockerpostgis

running Postgis Database in Docker Container


i am trying to run my Postgis Database in a Docker Container. Therefore i dumped my database and created a Dockerfile like this:

FROM mdillon/postgis
COPY z_myDump.sql /docker-entrypoint-initdb.d/

I use the mdillon postgis as base image (Postgis Extensions are already included) and copy my dump. The container disappears after a few seconds with the following error:

/usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/z_myDump.sql
/docker-entrypoint-initdb.d/z_myDump.sql: Permission denied

any idea?


Solution

  • changing permissions of the .sql file before building the image did the job ... my bad