pelias / pip-service

Pelias point-in-polygon-service
https://pelias.io
MIT License
16 stars 18 forks source link

fixes #1: write permission for user pelias to /mnt/pelias #109

Closed arne-cl closed 5 years ago

orangejulius commented 5 years ago

Hey @arne-cl, I don't think we really want to go out of our way to support downloading data directly onto the container filesystem, and since we support running the Pelias Docker images as any non-root user, it doesn't seem to make sense to to set permissions for the pelias user in the Dockerfile, when that may or may not be the user that's running when the image is used.

In my mind, it's better to take your example command from https://github.com/pelias/pip-service/issues/108 and change it to something like this, which ensures the WOF data is written to a mounted volume:

julian@manhattan ~ $ mkdir -p ~/data/pelias/tmp/
julian@manhattan ~ $ docker run --entrypoint=/code/pelias/pip-service/bin/download -v "/home/julian/data/pelias/tmp:/mnt/pelias" -ti pelias/pip-service:latest                                                                                
Downloading whosonfirst-data-ocean-latest.tar.bz2 bundle
Downloading whosonfirst-data-marinearea-latest.tar.bz2 bundle
Downloading whosonfirst-data-continent-latest.tar.bz2 bundle
...

If there's something specific you have in mind to accomplish, let me know.

arne-cl commented 5 years ago

Dear @orangejulius,

my goal here was to fix the file permission issues in pelias/kubernetes#79, but since the situation is different between /mnt/pelias and /data/whosonfirst, I will have to try something else.