FROM python:3.14.0

RUN apt update -y && apt upgrade -y

COPY ./src /app

COPY flag_here.txt /flag_here.txt

WORKDIR /app

RUN python3 -m pip install -r requirements.txt

RUN useradd -ms /bin/bash ctf

RUN chown -R root:root /app && chmod -R 555 /app && chmod 444 /flag_here.txt

USER ctf

CMD ["python3", "/app/app.py"]