From f93416dbd5542157dee99b3440de77d0ad5e46de Mon Sep 17 00:00:00 2001 From: Peter Stace Date: Sat, 6 May 2023 06:20:07 +1000 Subject: [PATCH] Add initial Dockerfile for GEOS --- .ci/geos_images/Dockerfile | 20 ++++++++++++++++++++ .ci/geos_images/README.md | 16 ++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 .ci/geos_images/Dockerfile create mode 100644 .ci/geos_images/README.md diff --git a/.ci/geos_images/Dockerfile b/.ci/geos_images/Dockerfile new file mode 100644 index 00000000..67e1fed0 --- /dev/null +++ b/.ci/geos_images/Dockerfile @@ -0,0 +1,20 @@ +FROM debian:bullseye AS builder + +RUN apt-get update \ + && apt-get install -y cmake build-essential wget \ + && rm -rf /var/lib/apt/lists/* + +ARG GEOS_VERSION=3.11.2 +WORKDIR /tmp +RUN wget https://download.osgeo.org/geos/geos-$GEOS_VERSION.tar.bz2 && \ + tar -xf geos-$GEOS_VERSION.tar.bz2 && \ + rm geos-$GEOS_VERSION.tar.bz2 + +WORKDIR /tmp/geos-$GEOS_VERSION +RUN cmake . -DCMAKE_INSTALL_PREFIX=/usr/local && \ + make -j4 && \ + make install + +FROM debian:bullseye +COPY --from=builder /usr/local/ /usr/local/ +CMD ["geos-config", "--version"] diff --git a/.ci/geos_images/README.md b/.ci/geos_images/README.md new file mode 100644 index 00000000..b3794d47 --- /dev/null +++ b/.ci/geos_images/README.md @@ -0,0 +1,16 @@ +# GEOS Images + +This directory contains a Dockerfile and instructions for how to create GEOS +images. These images are used for CI. + +The images install GEOS from source. This is so that each version of GEOS can +be used in CI. + +## Building and uploading + +The following command assume the current working directory is the same as this +README. + +```sh +docker build . +```