samgis / dockerfiles /dockerfile-lambda-samgeo-api
aletrn's picture
[feat] rename dockerfile-lambda-samgeo-api
9e6626c
raw
history blame
875 Bytes
FROM 686901913580.dkr.ecr.eu-west-1.amazonaws.com/lambda-gdal-runner:latest
# 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"
# Set working directory to function root directory
WORKDIR ${LAMBDA_TASK_ROOT}
COPY ./src ${LAMBDA_TASK_ROOT}/src
RUN ls -l /usr/bin/which
RUN /usr/bin/which python
RUN python -v
RUN echo "PYTHONPATH: ${PYTHONPATH}."
RUN echo "PATH: ${PATH}."
RUN echo "LAMBDA_TASK_ROOT: ${LAMBDA_TASK_ROOT}."
RUN ls -l ${LAMBDA_TASK_ROOT}
RUN ls -ld ${LAMBDA_TASK_ROOT}
RUN python -c "import sys; print(sys.path)"
RUN python -c "import osgeo"
# RUN python -c "import rasterio"
RUN python -c "import awslambdaric"
RUN python -m pip list
RUN python -m pip freeze
RUN df -h
ENTRYPOINT ["/lambda-entrypoint.sh"]
CMD [ "src.app.lambda_handler" ]