Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Dockerfile.alpine 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. RUN apk add --no-cache \
  7. bash \
  8. curl \
  9. wget \
  10. && export BUILD_GITHUB_TAG=${CHATGPT_ON_WECHAT_VER:-`curl -sL "https://api.github.com/repos/zhayujie/chatgpt-on-wechat/releases/latest" | \
  11. grep '"tag_name":' | \
  12. sed -E 's/.*"([^"]+)".*/\1/'`} \
  13. && wget -t 3 -T 30 -nv -O chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \
  14. https://github.com/zhayujie/chatgpt-on-wechat/archive/refs/tags/${BUILD_GITHUB_TAG}.tar.gz \
  15. && tar -xzf chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \
  16. && mv chatgpt-on-wechat-${BUILD_GITHUB_TAG} ${BUILD_PREFIX} \
  17. && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \
  18. && cd ${BUILD_PREFIX} \
  19. && cp config-template.json ${BUILD_PREFIX}/config.json \
  20. && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
  21. && pip install --no-cache \
  22. itchat-uos==1.5.0.dev0 \
  23. openai \
  24. && apk del curl wget
  25. WORKDIR ${BUILD_PREFIX}
  26. ADD ./entrypoint.sh /entrypoint.sh
  27. RUN chmod +x /entrypoint.sh \
  28. && adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \
  29. && chown -R noroot:noroot ${BUILD_PREFIX}
  30. USER noroot
  31. ENTRYPOINT ["/entrypoint.sh"]