FROM amazon/aws-lambda-python:3.11

COPY requirements.txt requirements-dev.txt pyproject.toml ./
RUN pip install --upgrade pip && \
    pip install -r requirements-dev.txt

COPY lint-and-test.sh docker-compose.yaml ./
COPY owslogger/ ./owslogger
COPY tests/ ./tests
COPY sample_flask.py ./sample_flask.py
COPY sample_fastapi.py ./sample_fastapi.py

ENTRYPOINT [ "/var/task/lint-and-test.sh" ]
