forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Docker: update ubuntu-small to 24.04 [ci skip]
- Loading branch information
Showing
2 changed files
with
27 additions
and
22 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 |
---|---|---|
|
@@ -6,8 +6,8 @@ | |
# or licensed under MIT (LICENSE.TXT) Copyright 2019 Even Rouault <[email protected]> | ||
|
||
ARG PROJ_INSTALL_PREFIX=/usr/local | ||
ARG BASE_IMAGE=ubuntu:22.04 | ||
ARG TARGET_BASE_IMAGE=ubuntu:22.04 | ||
ARG BASE_IMAGE=ubuntu:24.04 | ||
ARG TARGET_BASE_IMAGE=ubuntu:24.04 | ||
|
||
FROM $BASE_IMAGE as builder | ||
|
||
|
@@ -21,18 +21,19 @@ COPY ./bh-set-envvars.sh /buildscripts/bh-set-envvars.sh | |
RUN . /buildscripts/bh-set-envvars.sh \ | ||
&& if test "${TARGET_ARCH}" != ""; then \ | ||
rm -f /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse" >> /etc/apt/sources.list \ | ||
rm -f /etc/apt/sources.list.d/ubuntu.sources \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble-updates main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://us.archive.ubuntu.com/ubuntu/ noble-backports main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=amd64] http://security.ubuntu.com/ubuntu noble-security main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe" >> /etc/apt/sources.list \ | ||
&& echo "deb [arch=${TARGET_ARCH}] http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe" >> /etc/apt/sources.list \ | ||
&& dpkg --add-architecture ${TARGET_ARCH} \ | ||
&& apt-get update -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y g++-11-${GCC_ARCH}-linux-gnu \ | ||
&& ln -s ${GCC_ARCH}-linux-gnu-gcc-11 /usr/bin/${GCC_ARCH}-linux-gnu-gcc \ | ||
&& ln -s ${GCC_ARCH}-linux-gnu-g++-11 /usr/bin/${GCC_ARCH}-linux-gnu-g++ \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y g++-13-${GCC_ARCH}-linux-gnu \ | ||
&& ln -s ${GCC_ARCH}-linux-gnu-gcc-13 /usr/bin/${GCC_ARCH}-linux-gnu-gcc \ | ||
&& ln -s ${GCC_ARCH}-linux-gnu-g++-13 /usr/bin/${GCC_ARCH}-linux-gnu-g++ \ | ||
&& rm -rf /var/lib/apt/lists/*; \ | ||
fi | ||
|
||
|
@@ -134,10 +135,12 @@ RUN . /buildscripts/bh-set-envvars.sh \ | |
&& ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO_FIRST} \ | ||
&& ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so \ | ||
&& rm /build${PROJ_INSTALL_PREFIX}/lib/libproj.* \ | ||
&& ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libproj.so.${PROJ_SO} \ | ||
&& ln -s libinternalproj.so.${PROJ_SO} /build${PROJ_INSTALL_PREFIX}/lib/libproj.so.${PROJ_SO_FIRST} \ | ||
&& ${GCC_ARCH}-linux-gnu-strip -s /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO} \ | ||
&& for i in /build${PROJ_INSTALL_PREFIX}/bin/*; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done | ||
&& for i in /build${PROJ_INSTALL_PREFIX}/bin/*; do ${GCC_ARCH}-linux-gnu-strip -s $i 2>/dev/null || /bin/true; done \ | ||
&& apt-get update -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y patchelf \ | ||
&& patchelf --set-soname libinternalproj.so.${PROJ_SO_FIRST} /build${PROJ_INSTALL_PREFIX}/lib/libinternalproj.so.${PROJ_SO} \ | ||
&& for i in /build${PROJ_INSTALL_PREFIX}/bin/*; do patchelf --replace-needed libproj.so.${PROJ_SO_FIRST} libinternalproj.so.${PROJ_SO_FIRST} $i; done | ||
|
||
# Build GDAL | ||
ARG GDAL_VERSION=master | ||
|
@@ -172,9 +175,11 @@ RUN . /buildscripts/bh-set-envvars.sh \ | |
fi \ | ||
&& mkdir build \ | ||
&& cd build \ | ||
&& CFLAGS='-DPROJ_RENAME_SYMBOLS -O2' CXXFLAGS='-DPROJ_RENAME_SYMBOLS -DPROJ_INTERNAL_CPP_NAMESPACE -O2' \ | ||
# -Wno-psabi avoid 'note: parameter passing for argument of type 'std::pair<double, double>' when C++17 is enabled changed to match C++14 in GCC 10.1' on arm64 | ||
&& CFLAGS='-DPROJ_RENAME_SYMBOLS -O2' CXXFLAGS='-DPROJ_RENAME_SYMBOLS -DPROJ_INTERNAL_CPP_NAMESPACE -O2 -Wno-psabi' \ | ||
cmake .. \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DGDAL_FIND_PACKAGE_PROJ_MODE=MODULE \ | ||
-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 \ | ||
|
@@ -219,19 +224,19 @@ RUN apt-get update -y && apt-get upgrade -y \ | |
RUN apt-get update \ | ||
# PROJ dependencies | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
libsqlite3-0 libtiff5 libcurl4 \ | ||
libsqlite3-0 libtiff6 libcurl4 \ | ||
curl unzip ca-certificates \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# GDAL dependencies | ||
RUN apt-get update -y \ | ||
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
python3-numpy libpython3.10 \ | ||
libjpeg-turbo8 libgeos3.10.2 libgeos-c1v5 \ | ||
python3-numpy libpython3.12 \ | ||
libjpeg-turbo8 libgeos3.12.1 libgeos-c1v5 \ | ||
libexpat1 \ | ||
libxerces-c3.2 \ | ||
libwebp7 libpng16-16 \ | ||
libzstd1 bash libpq5 libssl3 libopenjp2-7 libspatialite7 \ | ||
libzstd1 bash libpq5 libssl3 libopenjp2-7 libspatialite8 \ | ||
# pil for antialias option of gdal2tiles | ||
python3-pil \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
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