Skip to content
Snippets Groups Projects
Commit fa25ca6e authored by Nicola Jordan's avatar Nicola Jordan
Browse files

added gdal docker build

parent cdc8d234
No related branches found
No related tags found
No related merge requests found
The version downloaded apparently doesn't yield the correct version when using releases, therefore
a change in `gdal/docker/ubuntu-full/bh-gdal.sh` might be needed:
```bash
# ...
# comment out
# wget -q "https://github.com/${GDAL_REPOSITORY}/archive/${GDAL_VERSION}.tar.gz" \
# -O - | tar xz -C gdal --strip-components=1
# removes the "v"
GDAL_V=${GDAL_VERSION#?}
wget -q "https://github.com/${GDAL_REPOSITORY}/releases/download/v${GDAL_V}/gdal-${GDAL_V}.tar.gz" \
-O - | tar xz -C gdal --strip-components=1
# ...
```
**and replace** in `ubunutu-full/Dockerfile`:
```dockerfile
ARG WITH_FILEGDB=
```
with
```dockerfile
ARG WITH_FILEGDB=1
```
**if issues with libjxl, checkout specific version**:
ie. -> `&& git checkout v0.6.1`
```dockerfile
# Build libjxl
RUN . /buildscripts/bh-set-envvars.sh \
&& git clone https://github.com/libjxl/libjxl.git \
&& cd libjxl \
&& git checkout v0.6.1 \
&& git submodule update --init --recursive \
&& mkdir build \
&& cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF .. \
&& make -j$(nproc) \
&& make -j$(nproc) install \
&& make install DESTDIR="/build_thirdparty" \
&& cd ../.. \
&& rm -rf libjxl
```
\ No newline at end of file
...@@ -6,12 +6,18 @@ set -e ...@@ -6,12 +6,18 @@ set -e
GDAL_VERSION="3.4.1" GDAL_VERSION="3.4.1"
PROJ_VERSION="8.2.1" PROJ_VERSION="8.2.1"
echo "if this script fails, please clone the right version of GDAL sources"
echo "ie."
# if not cloned already, clone it: # if not cloned already, clone it:
git clone git@github.com:OSGeo/gdal.git gdal || true echo "git clone git@github.com:OSGeo/gdal.git gdal"
echo "cd gdal"
echo "git pull"
echo "git checkout v${GDAL_VERSION}"
echo
echo "then try again"
echo
cd gdal/docker cd gdal/gdal/docker
git pull
# python:3 -> 08.2021 = bullseye (debian) # python:3 -> 08.2021 = bullseye (debian)
WITH_PDFIUM=1 WITH_FILEGDB=1 BASE_IMAGE="ubuntu:20.04" TARGET_BASE_IMAGE="ubuntu:20.04" TARGET_IMAGE="geometalab/gdal:full" ubuntu-full/build.sh --release --gdal v${GDAL_VERSION} --proj ${PROJ_VERSION} WITH_PDFIUM=1 WITH_FILEGDB=1 BASE_IMAGE="ubuntu:20.04" TARGET_BASE_IMAGE="ubuntu:20.04" TARGET_IMAGE="geometalab/gdal:full" ubuntu-full/build.sh --release --gdal v${GDAL_VERSION} --proj ${PROJ_VERSION}
...@@ -22,3 +28,7 @@ WITH_PDFIUM=1 WITH_FILEGDB=1 BASE_IMAGE="ubuntu:20.04" TARGET_BASE_IMAGE="ubuntu ...@@ -22,3 +28,7 @@ WITH_PDFIUM=1 WITH_FILEGDB=1 BASE_IMAGE="ubuntu:20.04" TARGET_BASE_IMAGE="ubuntu
docker push "geometalab/gdal:full-v${GDAL_VERSION}" docker push "geometalab/gdal:full-v${GDAL_VERSION}"
docker run --rm -it "geometalab/gdal:full-v${GDAL_VERSION}" ogrinfo --formats | grep -i gdb docker run --rm -it "geometalab/gdal:full-v${GDAL_VERSION}" ogrinfo --formats | grep -i gdb
echo "image built"
echo "geometalab/gdal:full-v${GDAL_VERSION}"
echo
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment