From 92859085366380c1b3a21bb86fa843728f4d63e7 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sun, 19 Nov 2023 13:13:30 +0100 Subject: [PATCH 1/2] Dockerfile: update to GDAL 3.8.0 Use the same version of the image for the builder and the main image. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c97431f4..14d3dcf0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 as builder +FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.0 as builder # Setup build env for postgresql-client-14 USER root @@ -36,7 +36,7 @@ RUN if [ "$PYDEV_DEBUG" = "yes" ]; then \ RUN pip freeze -FROM osgeo/gdal:ubuntu-small-latest +FROM ghcr.io/osgeo/gdal:ubuntu-small-3.8.0 # all the python pip installed libraries COPY --from=builder /usr/local/lib/python3.10/dist-packages /usr/local/lib/python3.10/dist-packages From 515051efa93e032d261119b8589749a54be7ccc9 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Sun, 19 Nov 2023 13:15:04 +0100 Subject: [PATCH 2/2] Dockerfile: remove a couple of mkdir The WORKDIR directive will create the directory, so this saves a layer in the image. --- Dockerfile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 14d3dcf0..99f8d403 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,8 +19,6 @@ RUN apt-get update -y \ ENV GDAL_DISABLE_READDIR_ON_OPEN="EMPTY_DIR" -# make folders -RUN mkdir -p /code # Copy source code and install it WORKDIR /code COPY . /code @@ -62,8 +60,6 @@ COPY --from=builder /usr/local/bin/flask /usr/local/bin/flask COPY --from=builder /usr/local/bin/gunicorn /usr/local/bin/gunicorn # pybabel cli COPY --from=builder /usr/local/bin/pybabel /usr/local/bin/pybabel -# make folders for testing and keep code in image -RUN mkdir -p /code # Copy source code and install it WORKDIR /code COPY . /code