# Dockerfile -- tests

FROM        amazon/aws-lambda-python:3.12

ARG         version
LABEL       Version=$version
ENV         build_version=$version

RUN         dnf -y update
RUN         dnf -y install gcc glib2

ENV         POETRY_VIRTUALENVS_IN_PROJECT=0
ENV         POETRY_VIRTUALENVS_CREATE=0

COPY        config.py ./
COPY        pyproject.toml poetry.lock ./
COPY        src/ ./src
COPY        tests/ ./tests
COPY        scripts/ ./scripts

# Install poetry
RUN         pip install poetry==1.7.1

RUN         poetry install

ENTRYPOINT  [ "sh", "-c", "./scripts/unit-lint.sh" ]
