# please visit https://github.com/xfyun/aiges/releases to get stable and suitable iamges.

FROM docker.io/library/python:3.8.9


RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's|security.debian.org/debian-security|mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list


WORKDIR /home/user/app
RUN useradd -m -u 1000 user
RUN chown  -R 1000.1000 /home/user


RUN pip config set global.index-url https://pypi.mirrors.ustc.edu.cn/simple/


RUN pip install --no-cache-dir pip==22.3.1
RUN --mount=target=requirements.txt,source=requirements.txt 	pip install --no-cache-dir -r requirements.txt


COPY --chown=1000 ./ /home/user/app


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