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.

33 line
806B

  1. FROM python:3.7.9-alpine
  2. LABEL maintainer="foo@bar.com"
  3. ARG TZ='Asia/Shanghai'
  4. ARG CHATGPT_ON_WECHAT_VER
  5. ENV BUILD_PREFIX=/app
  6. COPY chatgpt-on-wechat.tar.gz ./chatgpt-on-wechat.tar.gz
  7. RUN apk add --no-cache \
  8. bash \
  9. && tar -xf chatgpt-on-wechat.tar.gz \
  10. && mv chatgpt-on-wechat ${BUILD_PREFIX} \
  11. && cd ${BUILD_PREFIX} \
  12. && cp config-template.json ${BUILD_PREFIX}/config.json \
  13. && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  14. && pip install --no-cache \
  15. itchat-uos==1.5.0.dev0 \
  16. openai
  17. WORKDIR ${BUILD_PREFIX}
  18. ADD ./entrypoint.sh /entrypoint.sh
  19. RUN chmod +x /entrypoint.sh \
  20. && adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \
  21. && chown -R noroot:noroot ${BUILD_PREFIX}
  22. USER noroot
  23. ENTRYPOINT ["/entrypoint.sh"]