FROM python:3.12-slim-bookworm

WORKDIR /var/app

# Update and install common packages
RUN apt-get update && apt-get install gcc g++ curl git tar zip make -y

# Install pipenv
RUN pip install pipenv

# Add application and install requirements
COPY Pipfile Pipfile.lock /var/app/
RUN pipenv install --dev --ignore-pipfile --system

COPY . /var/app/
COPY tests/integration/ /var/app/tests/integration/

RUN chmod 755 /var/app/tests-integration.sh

ENTRYPOINT [ "/var/app/tests-integration.sh" ]