[Geoserver-users] Docker not loading layers

I'm new to using docker to run geoserver so I could be missing something.

I followed the web page on running geoserver with docker.

I'm migrating to a new server and to a new geoserver version.

My server uses podman instead of docker but I don't think that is the problem.

As root I run the following command:

podman run -it -p 8080:8080 \
   --env SKIP_DEMO_DATA=true \
   --env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="wps" \
   --mount src="/root/my_data/data",target=/opt/geoserver_data/,type=bind \
   docker.osgeo.org/geoserver:2.25.2

Geoserver/web is accessible but:

- the demo layers are there
- my layers are not there

In the output the only relevant message I could find is:

25 Jun 08:11:53 ERROR [storage.DefaultStorageFinder] - Found system environment variableGEOSERVER_DATA_DIR set to /opt/geoserver_data/ , which is not writeable

or similar WARN messages.

What can I do?

Thank you
  
  maxx

25 Jun 08:11:53 ERROR [storage.DefaultStorageFinder] - Found system
environment variableGEOSERVER_DATA_DIR set to /opt/geoserver_data/ ,
which is not writable

Check your file permissions against the user running geoserver in your container.

···

Med hilsen

Kristian Morin
Geodata, systemutvikling

Enhet for kart og arkitektur

Sentralbord: 72 54 25 00

Telefon: 90539229

On 2024-06-25 10:38, Kristian Nils Robin Morin wrote:

Check your file permissions against the user running geoserver in your container.

I solved by changing from mount to volume:

podman run -it -p 8080:8080 \
   --env SKIP_DEMO_DATA=true \
   --env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="wps" \
   --volume /root/my_data/data:/opt/geoserver_data:z \
   docker.osgeo.org/geoserver:2.25.2

The problem is not with the "standard" directory permissions but with the SElinux extensions running on the server and its additional permissions. :z at the end of the container path makes the difference.

https://blog.christophersmart.com/2021/01/31/podman-volumes-and-selinux/

Thank you
  maxx