FROM public.ecr.aws/lambda/python:3.8

# Cached natively if unchanged.
COPY requirements.txt ./requirements.txt
COPY requirements-dev.txt ./requirements-dev.txt

RUN echo "assumeyes=1" >> /etc/yum.conf
# Install build tools for building wheels.
RUN yum update && yum install -y gcc gcc-c++ make

# Requirements will only reinstall if they have changed.
RUN pip install --upgrade pip
RUN pip install setuptools wheel
RUN pip install -r requirements.txt -r requirements-dev.txt

COPY .coveragerc docker-compose.yaml .flake8 lint-and-test.sh ./
COPY tests ./tests

COPY index.py config.py ./
COPY constants ./constants

CMD ["index.handler"]  
