ARG AWS_ACCOUNT=086679231553
FROM ${AWS_ACCOUNT}.dkr.ecr.us-east-1.amazonaws.com/docker-parent-images:python313 AS base
USER root
RUN apt-get update && apt-get -y upgrade && apt-get -y install make
USER worker
WORKDIR /var/app
COPY requirements.txt ./

FROM base AS unit-lint
COPY requirements-dev.txt .flake8 setup.py Makefile ./
COPY tests ./tests
COPY content_utils ./content_utils
RUN make pip_dev
ENTRYPOINT [ "make", "lint", "test_unit" ]

FROM base AS test-integration
COPY Makefile ./
COPY tests ./tests
RUN make env_integration
ENTRYPOINT [ "make", "test_integration" ]
