kartoza / docker-geoserver

A docker recipe for GeoServer
GNU General Public License v2.0
612 stars 418 forks source link

Data folder updates not shown in GeoServer Stores Creation #143

Closed Axel13fr closed 4 years ago

Axel13fr commented 4 years ago

Hi,

First of all many thanks for this docker image, I've been playing with it for some time successfully. There's one thing I can't get working:

Any ideas on that ?

Cheers

NyakudyaA commented 4 years ago

Hi,

First of all many thanks for this docker image, I've been playing with it for some time successfully. There's one thing I can't get working:

* my data dir is mounted from Host to Docker container to contain my map data to import

* when starting the container, it sees the map data already in that dir

* when from the host, I'm adding more map data in that dir, I can list them from a /bin/bash in the docker container but Geoserver doesn't display them in the admin page when I try to create a new store and browse the data dir to select the file.

Any ideas on that ?

Cheers

Hi, Are you using the file browser when trying to create a new store ?.

Maybe a gif would help explain your scenaria better

Axel13fr commented 4 years ago

Exactly, I'm using the file browser to create a new store, so that I can select files already present locally on the server. But although I can see from inside the docker that the new Store files I added (Geotiffs in my case) after container start are visible, Geoserver doesn't see them on the file browser.

My use case simply is to be able to add now files to import as stores while the server has already been started.

image

NyakudyaA commented 4 years ago

Exactly, I'm using the file browser to create a new store, so that I can select files already present locally on the server. But although I can see from inside the docker that the new Store files I added (Geotiffs in my case) after container start are visible, Geoserver doesn't see them on the file browser.

My use case simply is to be able to add now files to import as stores while the server has already been started.

image

What image are you using? I am thinking this could be a permission issue. Because if you are using the latest image they are running https://github.com/kartoza/docker-geoserver/blob/master/Dockerfile#L119

Axel13fr commented 4 years ago

Indeed, geoserveruser is used in the image I'm using. When running a bash inside the docker, I can see though that the Example.tif (which is present before container start) has the same rights as TEST update.tif which was added at runtime.

Could it be a geoserver issue ? I haven't tried to reproduce this by running geoserver outside docker.

image

NyakudyaA commented 4 years ago

Indeed, geoserveruser is used in the image I'm using. When running a bash inside the docker, I can see though that the Example.tif (which is present before container start) has the same rights as TEST update.tif which was added at runtime.

Could it be a geoserver issue ? I haven't tried to reproduce this by running geoserver outside docker.

image

I have tested this and it works on my side. Are you using a mounted storage or docker storage

Axel13fr commented 4 years ago

I'm using a bind mount, not a volume mount. From inside the docker, I also tried to copy a file from this mounted volume to another non mounted folder of the container and it didn't show up in geoserver file browser.

My docker version is 19.03.1. What about yours ?

NyakudyaA commented 4 years ago

I'm using a bind mount, not a volume mount. From inside the docker, I also tried to copy a file from this mounted volume to another non mounted folder of the container and it didn't show up in geoserver file browser.

My docker version is 19.03.1. What about yours ?

Hi I have verified this. Will look into this during the weekend. The permisions are wrong because they should be owned by the geoserver user instead.

Axel13fr commented 4 years ago

You are right, the permissions do not match the geoserveruser but that's expected when using bind mount. I'll build the image without the geoserveruser as a test.

NyakudyaA commented 4 years ago

You are right, the permissions do not match the geoserveruser but that's expected when using bind mount. I'll build the image without the geoserveruser as a test.

@Axel13fr Docker permisions are always a pain, you have to fix them before they are copied to the image. Can you test with the 2.17 image where I have removed the geoserver user

NyakudyaA commented 4 years ago

Fixed as image is using root user