Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

61 lines
2.0KB

  1. # #FROM python:3.10-slim-bullseye
  2. # FROM 139.224.254.18:5000/ssjl/python:3.10-slim-bullseye
  3. # LABEL maintainer="foo@bar.com"
  4. # ARG TZ='Asia/Shanghai'
  5. # # RUN echo /etc/apt/sources.list
  6. # #RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  7. # RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
  8. # ENV BUILD_PREFIX=/app
  9. # ADD . ${BUILD_PREFIX}
  10. # RUN cd ${BUILD_PREFIX} \
  11. # && cp config-template.json config.json \
  12. # && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  13. # && pip install --no-cache -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
  14. # WORKDIR ${BUILD_PREFIX}
  15. # ADD docker/entrypoint.sh /entrypoint.sh
  16. # RUN chmod +x /entrypoint.sh \
  17. # && mkdir -p /home/noroot \
  18. # && groupadd -r noroot \
  19. # && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \
  20. # && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} /usr/local/lib
  21. # USER noroot
  22. # ENTRYPOINT ["/entrypoint.sh"]
  23. FROM 139.224.254.18:5000/ssjl/python:3.10-slim-bullseye
  24. LABEL maintainer="foo@bar.com"
  25. ARG TZ='Asia/Shanghai'
  26. # RUN echo /etc/apt/sources.list
  27. #RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
  28. RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
  29. ENV BUILD_PREFIX=/app
  30. ADD . ${BUILD_PREFIX}
  31. # Install uv
  32. RUN /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  33. && pip install --no-cache uv -i https://mirrors.aliyun.com/pypi/simple/
  34. RUN cd ${BUILD_PREFIX} \
  35. && cp config-template.json config.json \
  36. && uv pip install --no-cache --system -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
  37. WORKDIR ${BUILD_PREFIX}
  38. ADD docker/entrypoint.sh /entrypoint.sh
  39. RUN chmod +x /entrypoint.sh \
  40. && mkdir -p /home/noroot \
  41. && groupadd -r noroot \
  42. && useradd -r -g noroot -s /bin/bash -d /home/noroot noroot \
  43. && chown -R noroot:noroot /home/noroot ${BUILD_PREFIX} /usr/local/lib
  44. USER noroot
  45. ENTRYPOINT ["/entrypoint.sh"]