Skip to content

Prepopulating PostGIS with OSM data works with Docker Desktop, but not with Azure pipeline #379

Answered by afarber
afarber asked this question in Q&A
Discussion options

You must be logged in to vote

Thank you for your suggestions, they have helped me to find the solution for the empty /var/lib/postgresql/data folder, when building a postgis/postgis:16.3 based Docker image with prefilled OSM database and I would like to share it here with other users -

After changing just a single line my Dockerfile has built successfully:

ENV PGDATA=/postgis

The reason seems to be that the parent official postgres Dockerfile contains this conflicting line:

VOLUME /var/lib/postgresql/data

and thus the folder I was trying to use originally was cleared.

Below is my working Dockerfile (and yes I understand that the built image is too big, especially with Europe data and thus I have to improve it further …

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@afarber
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by afarber
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants