Add GDAL with Java Bindings Support #138
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request allows the integration of GDAL into the resulting GeoServer docker image. With a specific focus on building the Java bindings. Unlike the default Ubuntu package sources (like
gdal-bin
), which do not only provide an outdated version, but especially do not provide the Java bindings, this implementation ensures full compatibility with GDAL.Related links:
Usage:
docker build --build-arg BUILD_GDAL=true -t my-geoserver-image .
Note: On average hardware, this takes ~10-15 mins, which is the reason to set the default for
BUILD_GDAL
tofalse
(which results in the same docker image as before). There are two more new build arguments for optional use:PROJ_VERSION=9.5.1
andGDAL_VERSION=3.10.1
The use of
--build-arg BUILD_GDAL=true
leads to an increase of the resulting image of (only!) ~200MB as the installation of gdal requires some dependent packages to be installed, but the footprint is still "minimal" as we pick the build artifacts withCOPY --from=gdal_builder
.I added the
--build-arg BUILD_GDAL=true
to the release script, so all future "official" GS docker image builds should contain GDAL with JAVA Bindings.Comparison "Before vs After"
Use this to start your image with the gdal extension, which can be used to test the gdal functionality:
docker run -it -p 8080:8080 --env INSTALL_EXTENSIONS=true --env STABLE_EXTENSIONS="gdal" my-geoserver-image
Before (without GDAL Java Bindings)
GeoServer-Log:
After (with GDAL Java Bindings)
GeoServer-Log: