Skip to content

Commit

Permalink
Docker: update dependencies, and bump Alpine to 3.18 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Sep 1, 2023
1 parent 07b70c2 commit a1464a4
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 12 deletions.
3 changes: 2 additions & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ best of our knowledge and not guaranteed. Users should check by themselves.
# Alpine based

Alpine version:
* 3.18 for GDAL 3.8
* 3.17 for GDAL 3.7
* 3.16 for GDAL 3.6
* 3.15 for GDAL 3.5
Expand Down Expand Up @@ -44,7 +45,7 @@ See [alpine-normal/Dockerfile](alpine-normal/Dockerfile)
# Ubuntu based

Ubuntu version:
* 22.04 for GDAL 3.6 and 3.7
* 22.04 for GDAL 3.6, 3.7 and 3.8
* 20.04 for GDAL 3.4 and 3.5

## Small: `ghcr.io/osgeo/gdal:ubuntu-small-latest`
Expand Down
27 changes: 23 additions & 4 deletions docker/alpine-normal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Public domain
# or licensed under MIT (LICENSE.TXT) Copyright 2019 Even Rouault <[email protected]>

ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
FROM alpine:${ALPINE_VERSION} as builder

# Derived from osgeo/proj by Howard Butler <[email protected]>
Expand Down Expand Up @@ -127,10 +127,28 @@ RUN mkdir proj \
&& for i in /build_proj/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& for i in /build_proj/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done

# Build freexl
ARG FREEXL_VERSION=2.0.0
RUN if test "${FREEXL_VERSION}" != ""; then ( \
wget -q https://www.gaia-gis.it/gaia-sins/freexl-${FREEXL_VERSION}.tar.gz \
&& tar xzf freexl-${FREEXL_VERSION}.tar.gz \
&& rm -f freexl-${FREEXL_VERSION}.tar.gz \
&& apk add --no-cache minizip-dev \
&& cd freexl-${FREEXL_VERSION} \
&& ./configure --prefix=/usr --disable-static \
&& make -j$(nproc) \
&& rm -f /usr/lib/libfreexl.* \
&& make install \
&& cp -P /usr/lib/libfreexl.so* /build_thirdparty/usr/lib \
&& for i in /build_thirdparty/usr/lib/*; do strip -s $i 2>/dev/null || /bin/true; done \
&& cd .. \
&& rm -rf freexl-${FREEXL_VERSION} \
); fi

# Build spatialite
ARG SPATIALITE_VERSION=5.0.1
ARG SPATIALITE_VERSION=5.1.0
RUN if test "${SPATIALITE_VERSION}" != "" -a "$(uname -m)" = "x86_64"; then ( \
wget -q http://www.gaia-gis.it/gaia-sins/libspatialite-${SPATIALITE_VERSION}.tar.gz \
wget -q https://www.gaia-gis.it/gaia-sins/libspatialite-sources/libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& tar xzf libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& rm -f libspatialite-${SPATIALITE_VERSION}.tar.gz \
&& cd libspatialite-${SPATIALITE_VERSION} \
Expand Down Expand Up @@ -209,6 +227,7 @@ RUN if test "${GDAL_VERSION}" = "master"; then \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DIconv_INCLUDE_DIR=/usr/include/gnu-libiconv \
-DIconv_LIBRARY=/usr/lib/libiconv.so \
-DBUILD_TESTING=OFF \
&& make -j$(nproc) \
&& make install DESTDIR="/build" \
&& (make -j$(nproc) multireadtest && cp apps/multireadtest /build/usr/bin) \
Expand Down Expand Up @@ -260,7 +279,7 @@ RUN apk add --no-cache \
icu-libs \
python3 py3-numpy ${POPPLER} pcre2 libpq libxml2 portablexdr openjpeg \
netcdf hdf5 freexl \
openexr libheif xerces-c geos cfitsio minizip \
openexr-libopenexr imath libheif xerces-c geos cfitsio minizip \
lz4-libs blosc libdeflate brotli-libs liburiparser \
libarchive \
kealib libjxl \
Expand Down
3 changes: 2 additions & 1 deletion docker/alpine-small/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Public domain
# or licensed under MIT (LICENSE.TXT) Copyright 2019 Even Rouault <[email protected]>

ARG ALPINE_VERSION=3.17
ARG ALPINE_VERSION=3.18
FROM alpine:${ALPINE_VERSION} as builder

# Derived from osgeo/proj by Howard Butler <[email protected]>
Expand Down Expand Up @@ -127,6 +127,7 @@ RUN if test "${GDAL_VERSION}" = "master"; then \
-DCMAKE_BUILD_TYPE=Release \
-DGDAL_USE_TIFF_INTERNAL=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DBUILD_TESTING=OFF \
&& make -j$(nproc) \
&& make install DESTDIR="/build" \
&& cd .. \
Expand Down
16 changes: 10 additions & 6 deletions docker/ubuntu-full/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ RUN . /buildscripts/bh-set-envvars.sh \
&& for i in /build_thirdparty/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done

# Build mongo-c-driver
ARG MONGO_C_DRIVER_VERSION=1.23.2
ARG MONGO_C_DRIVER_VERSION=1.24.3
RUN . /buildscripts/bh-set-envvars.sh \
&& mkdir mongo-c-driver \
&& wget -q https://github.com/mongodb/mongo-c-driver/releases/download/${MONGO_C_DRIVER_VERSION}/mongo-c-driver-${MONGO_C_DRIVER_VERSION}.tar.gz -O - \
Expand All @@ -108,7 +108,7 @@ RUN . /buildscripts/bh-set-envvars.sh \
&& for i in /build_thirdparty/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done

# Build mongocxx
ARG MONGOCXX_VERSION=3.7.0
ARG MONGOCXX_VERSION=3.8.0
RUN . /buildscripts/bh-set-envvars.sh \
&& mkdir mongocxx \
&& wget -q https://github.com/mongodb/mongo-cxx-driver/archive/r${MONGOCXX_VERSION}.tar.gz -O - \
Expand All @@ -126,8 +126,11 @@ RUN . /buildscripts/bh-set-envvars.sh \
&& for i in /build_thirdparty/usr/bin/*; do strip -s $i 2>/dev/null || /bin/true; done

# Build tiledb
ARG TILEDB_VERSION=2.15.3
ARG TILEDB_VERSION=2.16.3
RUN . /buildscripts/bh-set-envvars.sh \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y \
libspdlog-dev${APT_ARCH_SUFFIX} \
&& mkdir tiledb \
&& wget -q https://github.com/TileDB-Inc/TileDB/archive/${TILEDB_VERSION}.tar.gz -O - \
| tar xz -C tiledb --strip-components=1 \
Expand Down Expand Up @@ -224,9 +227,9 @@ RUN . /buildscripts/bh-set-envvars.sh \
&& rm -rf /var/lib/apt/lists/*

# Install Arrow C++
ARG ARROW_VERSION=11.0.0-1
ARG ARROW_VERSION=13.0.0-1
# ARROW_SOVERSION to be updated in the "Build final image" section too
ARG ARROW_SOVERSION=1100
ARG ARROW_SOVERSION=1300
RUN . /buildscripts/bh-set-envvars.sh \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y -V ca-certificates lsb-release wget \
Expand Down Expand Up @@ -285,7 +288,7 @@ FROM $TARGET_BASE_IMAGE as runner
USER root
RUN date
ARG JAVA_VERSION=17
ARG ARROW_SOVERSION=1100
ARG ARROW_SOVERSION=1300

# Update distro
RUN apt-get update -y && apt-get upgrade -y \
Expand All @@ -312,6 +315,7 @@ RUN apt-get update \
libbrotli1 \
libarchive13 \
libaec0 \
libspdlog1 \
python-is-python3 \
# pil for antialias option of gdal2tiles
python3-pil \
Expand Down
1 change: 1 addition & 0 deletions docker/ubuntu-full/bh-gdal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ wget -q "https://github.com/${GDAL_REPOSITORY}/archive/${GDAL_VERSION}.tar.gz" \
echo "${GDAL_CMAKE_EXTRA_OPTS}"
cmake .. \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_TESTING=OFF \
-DPROJ_INCLUDE_DIR="/build${PROJ_INSTALL_PREFIX-/usr/local}/include" \
-DPROJ_LIBRARY="/build${PROJ_INSTALL_PREFIX-/usr/local}/lib/libinternalproj.so" \
-DGDAL_USE_TIFF_INTERNAL=ON \
Expand Down
1 change: 1 addition & 0 deletions docker/ubuntu-small/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ RUN . /buildscripts/bh-set-envvars.sh \
-DPROJ_LIBRARY="/build${PROJ_INSTALL_PREFIX-/usr/local}/lib/libinternalproj.so" \
-DGDAL_USE_TIFF_INTERNAL=ON \
-DGDAL_USE_GEOTIFF_INTERNAL=ON \
-DBUILD_TESTING=OFF \
&& make -j$(nproc) \
&& make install DESTDIR="/build" \
&& cd .. \
Expand Down

0 comments on commit a1464a4

Please sign in to comment.