oscarfonts / docker-geoserver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do you run the container with an extension?

iboates opened this issue · comments

I commented out everything except for the extension I want (control-flow) in extensions

Then I ran:

build_exts_dir.sh 2.15.0

I see that geoserver_exts/control-flow gets created with the relevant .jar inside

Then I built version 2.15.0 it like so:

cd 2.15.0
docker build .

The created image is called c01e1cc50424

And then I run the container like so:

docker run -d -p 8080:8080 -v /path/to/local/exts_dir:/home/isaac/docker-geoserver/geoserver-exts/ --name geoserver_with_exts c01e1cc50424

But when I go into an interactive shell and look for the control.properties file as per the docs, it is not there:

docker run -it c01e1cc50424 /bin/bash
root@0b24fe3a0d72:/usr/local/tomcat# cd /var/local/geoserver
root@0b24fe3a0d72:/var/local/geoserver# ls -l
total 76
-rw-rw-r-- 1 root staff 3399 Feb 27 03:20 README.rst
drwxrwsr-x 6 root staff 4096 Feb 27 03:20 coverages
-rw-rw-r-- 1 root staff  821 Feb 27 03:20 csw.xml
drwxrwsr-x 6 root staff 4096 Feb 27 03:20 data
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 demo
-rw-rw-r-- 1 root staff 1694 Feb 27 03:20 global.xml
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 layergroups
-rw-rw-r-- 1 root staff  144 Feb 27 03:20 logging.xml
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 palettes
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 plugIns
drwxrwsr-x 8 root staff 4096 Feb 27 03:20 security
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 styles
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 user_projections
drwxrwsr-x 2 root staff 4096 Feb 27 03:20 validation
-rw-rw-r-- 1 root staff 1336 Feb 27 03:20 wcs.xml
-rw-rw-r-- 1 root staff 1846 Feb 27 03:20 wfs.xml
-rw-rw-r-- 1 root staff 1553 Feb 27 03:20 wms.xml
drwxrwsr-x 9 root staff 4096 Feb 27 03:20 workspaces
drwxrwsr-x 4 root staff 4096 Feb 27 03:20 www

Am I missing a step?

Your -v parameter is not correct. Should be something like: /home/isaac/docker-geoserver/geoserver-exts:/var/local/geoserver-exts/.

Can I confirm I've understood this correctly, I'm trying to test 2.15.2 with the vectortile extension. Using mapbox

I've downloaded the vectortiles extension (for version 2.15.2) I want to the folder /Users/dominic/Downloads/geoserver_extensions I then ran

docker run -d -p 8080:8080 -v /Users/dominic/Downloads/geoserver_extensions:/var/local/geoserver-exts/ --name=My215_instance oscarfonts/geoserver
I then start the container and go to http://localhost:8080/geoserver
In Geoserver I see.

Screen Shot 2019-08-06 at 16 56 40

Which looks different to the official tutorial which shows

Screen Shot 2019-08-06 at 17 05 44

My requests to get the tiles result in a 400 error as below

Object { status: 400, url: "http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=lbsm:os_local_buildings_matview&STYLE=&TILEMATRIX=MyEPSG:900913:12&TILEMATRIXSET=MyEPSG:900913&FORMAT=application/x-protobuf;type=mapbox-vector&TILECOL=2046&TILEROW=1362", name: "e", message: "", stack: "" }
Which I'm trying to debug starting with ensuring the tile extension is working

Hello @dominijk

Regarding your first comment, you should need to do any docker build to use extensions; just using an already available image should work directly with docker run. As for the controlflow.properties I'm not really proficient with that extension, but it seems you need to create the file yourself with the required configuration, the plugin doesn't seem to provide any default.

In your second comment, the vector tiles extension seems to be installed correctly since you have the mapbox-vector-tile option available? Your instance might not look exactly the same as the docs maybe because of different versions or different configuration used by you and whoever made the docs, but if the configuration is there the extension is most probably installed correctly.

Closing the ticket since it's quite old and seems resolved. Feel free to reopen if the issue is not resolved.