You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
647B

  1. FROM python:3.10-alpine
  2. LABEL maintainer="foo@bar.com"
  3. ARG TZ='Asia/Shanghai'
  4. ARG CHATGPT_ON_WECHAT_VER
  5. ENV BUILD_PREFIX=/app
  6. ADD . ${BUILD_PREFIX}
  7. RUN apk add --no-cache bash ffmpeg espeak \
  8. && cd ${BUILD_PREFIX} \
  9. && cp config-template.json config.json \
  10. && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  11. && pip install --no-cache -r requirements.txt
  12. WORKDIR ${BUILD_PREFIX}
  13. ADD docker/entrypoint.sh /entrypoint.sh
  14. RUN chmod +x /entrypoint.sh \
  15. && adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \
  16. && chown -R noroot:noroot ${BUILD_PREFIX}
  17. USER noroot
  18. ENTRYPOINT ["docker/entrypoint.sh"]