FROM ghcr.io/osgeo/gdal:ubuntu-small-3.7.2 # Include global arg in this stage of the build ARG LAMBDA_TASK_ROOT="/var/task" ARG PYTHONPATH="${LAMBDA_TASK_ROOT}:${PYTHONPATH}:/usr/local/lib/python3/dist-packages" ARG RIE="https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie" # Set working directory to function root directory WORKDIR ${LAMBDA_TASK_ROOT} COPY requirements_dev.txt ${LAMBDA_TASK_ROOT}/requirements_dev.txt RUN apt update && apt install -y curl python3-pip RUN python -m pip install -r ${LAMBDA_TASK_ROOT}/requirements_dev.txt --target ${LAMBDA_TASK_ROOT} RUN curl -Lo /usr/local/bin/aws-lambda-rie ${RIE} RUN chmod +x /usr/local/bin/aws-lambda-rie COPY ./scripts/lambda-entrypoint.sh /lambda-entrypoint.sh RUN chmod +x /lambda-entrypoint.sh RUN ls -l /lambda-entrypoint.sh ENTRYPOINT ["/lambda-entrypoint.sh"]