-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update src/apps/base-images/gdal/Dockerfile Co-authored-by: Daniel Koch <[email protected]>
- Loading branch information
Showing
2 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#FROM geoservercloud/gs-cloud-base-jre:$TAG as builder | ||
FROM eclipse-temurin:11-jdk as builder | ||
|
||
LABEL maintainer="GeoServer PSC <[email protected]>" | ||
|
||
ENV GDAL_VERSION 3.8.4 | ||
ENV GDAL_PATH /usr/share/gdal | ||
ENV GDAL_DATA $GDAL_PATH/3.8.4 | ||
ENV PATH $GDAL_PATH:$PATH | ||
ENV LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/lib/jni:/usr/share/java:/usr/local/lib/:/usr/lib/ | ||
|
||
# | ||
# GDAL INSTALLATION | ||
# | ||
# Manual compilation - https://stackoverflow.com/questions/76913667/unable-to-locate-package-libgdal-java | ||
RUN apt update && apt-get install -y wget build-essential libuv1-dev g++ libstdc++6 make linux-headers-generic \ | ||
libssl-dev swig zlib1g-dev proj-bin proj-data libproj-dev sqlite3 libsqlite3-dev \ | ||
libtiff-dev libcurl4-openssl-dev cmake libcrypto++-dev ant libeccodes-dev libnetcdf-dev | ||
# Install GDAL | ||
RUN wget https://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz -O /tmp/gdal.tar.gz && \ | ||
tar xzf /tmp/gdal.tar.gz -C /tmp && \ | ||
cd /tmp/gdal-${GDAL_VERSION} && \ | ||
sed -i 's/source="7"/source="8"/' /tmp/gdal-${GDAL_VERSION}/swig/java/build.xml && \ | ||
sed -i 's/target="7"/target="8"/' /tmp/gdal-${GDAL_VERSION}/swig/java/build.xml | ||
RUN cd /tmp/gdal-${GDAL_VERSION} && mkdir build && cd build && cmake .. && cmake --build . && cmake --build . --target install | ||
|
||
RUN cp /tmp/gdal-3.8.4/build/swig/java/gdal.jar /tmp/gdal.jar | ||
RUN cp /tmp/gdal-3.8.4/build/swig/java/libgdalalljni.so /tmp/libgdalalljni.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.geoserver.cloud.apps</groupId> | ||
<artifactId>gs-cloud-base-images</artifactId> | ||
<version>${revision}</version> | ||
</parent> | ||
<artifactId>gs-cloud-base-jre-gdal</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Base GDAL image</name> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<version>${spring-boot.version}</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |