From 8a91392d38c8e059fa804a49d74c8cfab5d8ff3b Mon Sep 17 00:00:00 2001 From: Jay Roebuck Date: Wed, 24 Apr 2024 12:18:37 -0400 Subject: [PATCH] update Lambda Docker Image for v2.3.0, python 3.11 - `pyzmq` install via pip requires `g++`; installs `gcc-c++` via yum to enable build to succeed - updates defaults to py3.11 and arcgis v2.3.0 --- .github/workflows/DockerBuild.LambdaBaseImage.yaml | 4 ++-- docker/LambdaBaseImage.Dockerfile | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/DockerBuild.LambdaBaseImage.yaml b/.github/workflows/DockerBuild.LambdaBaseImage.yaml index a9630f8511..557f00c845 100644 --- a/.github/workflows/DockerBuild.LambdaBaseImage.yaml +++ b/.github/workflows/DockerBuild.LambdaBaseImage.yaml @@ -7,11 +7,11 @@ on: version: description: "Version of ArcGIS API for Python to install in the image" type: string - default: "2.2.0" + default: "2.3.0" python_version: description: "Python version to base image on" type: string - default: "3.9" + default: "3.11" is_latest_release: description: "Version of ArcGIS API for Python is Latest current release" type: boolean diff --git a/docker/LambdaBaseImage.Dockerfile b/docker/LambdaBaseImage.Dockerfile index ce63bb43ab..6989efe5c7 100644 --- a/docker/LambdaBaseImage.Dockerfile +++ b/docker/LambdaBaseImage.Dockerfile @@ -1,5 +1,5 @@ -ARG python_version=3.9 -# lambda python image, defaults to python 3.9 +ARG python_version=3.11 +# lambda python image, defaults to python 3.11 FROM public.ecr.aws/lambda/python:${python_version} # set metadata @@ -9,9 +9,10 @@ LABEL org.opencontainers.image.licenses=Apache LABEL org.opencontainers.image.source=https://github.com/esri/arcgis-python-api # install dependencies, then clean yum cache -RUN yum -y install gcc krb5-devel krb5-server krb5-libs && yum clean all && rm -rf /var/cache/yum +RUN yum -y install gcc gcc-c++ krb5-devel krb5-server krb5-libs && yum clean all && rm -rf /var/cache/yum # install arcgis -ARG arcgis_version="2.2.0" +ARG arcgis_version="2.3.0" +# adding .* ensures the latest patch version is installed RUN pip3 install "arcgis==${arcgis_version}.*" --target "${LAMBDA_TASK_ROOT}" # set entrypoint to app.py handler method # (note that app.py is missing from this base image)