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

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

# 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 handler.py rules.py workstation_rules.py ./
COPY constants ./constants
COPY utils ./utils
COPY tests/unit/data ./data
COPY ddex_ingester_common ./ddex_ingester_common
COPY ddex_ingester_common ./tests/unit/ddex_ingester_common

CMD ["index.handler"]  
