FROM python:3.13.3-bullseye
LABEL authors="tzu-weihuang"

ENV DISPLAY=:99

RUN apt-get -y update
RUN apt-get install -y p7zip-full

RUN useradd -ms /bin/bash -u 1000 jenkins && echo "jenkins ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

WORKDIR /app

COPY requirements.txt .
RUN pip3 install --upgrade pip
RUN pip3 install --no-cache-dir -r requirements.txt
RUN pip3 install --no-cache-dir pytest

COPY . .

USER jenkins

CMD ["bash"]