Browse Source

docker: remove unused command

master
lanvent 1 year ago
parent
commit
c3a2bd70ff
4 changed files with 5 additions and 11 deletions
  1. +1
    -3
      docker/Dockerfile.alpine
  2. +1
    -3
      docker/Dockerfile.debian
  3. +2
    -4
      docker/Dockerfile.latest
  4. +1
    -1
      docker/entrypoint.sh

+ 1
- 3
docker/Dockerfile.alpine View File

@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai'


ARG CHATGPT_ON_WECHAT_VER ARG CHATGPT_ON_WECHAT_VER


ENV BUILD_PREFIX=/app \
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE'
ENV BUILD_PREFIX=/app


RUN apk add --no-cache \ RUN apk add --no-cache \
bash \ bash \
@@ -22,7 +21,6 @@ RUN apk add --no-cache \
&& rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \
&& cd ${BUILD_PREFIX} \ && cd ${BUILD_PREFIX} \
&& cp config-template.json ${BUILD_PREFIX}/config.json \ && cp config-template.json ${BUILD_PREFIX}/config.json \
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
&& pip install --no-cache \ && pip install --no-cache \
itchat-uos==1.5.0.dev0 \ itchat-uos==1.5.0.dev0 \


+ 1
- 3
docker/Dockerfile.debian View File

@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai'


ARG CHATGPT_ON_WECHAT_VER ARG CHATGPT_ON_WECHAT_VER


ENV BUILD_PREFIX=/app \
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE'
ENV BUILD_PREFIX=/app


RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
@@ -23,7 +22,6 @@ RUN apt-get update \
&& rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \
&& cd ${BUILD_PREFIX} \ && cd ${BUILD_PREFIX} \
&& cp config-template.json ${BUILD_PREFIX}/config.json \ && cp config-template.json ${BUILD_PREFIX}/config.json \
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
&& pip install --no-cache \ && pip install --no-cache \
itchat-uos==1.5.0.dev0 \ itchat-uos==1.5.0.dev0 \


+ 2
- 4
docker/Dockerfile.latest View File

@@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai'


ARG CHATGPT_ON_WECHAT_VER ARG CHATGPT_ON_WECHAT_VER


ENV BUILD_PREFIX=/app \
BUILD_OPEN_AI_API_KEY='YOUR OPEN AI KEY HERE'
ENV BUILD_PREFIX=/app


COPY chatgpt-on-wechat.tar.gz ./chatgpt-on-wechat.tar.gz COPY chatgpt-on-wechat.tar.gz ./chatgpt-on-wechat.tar.gz


@@ -16,11 +15,10 @@ RUN apk add --no-cache \
&& mv chatgpt-on-wechat ${BUILD_PREFIX} \ && mv chatgpt-on-wechat ${BUILD_PREFIX} \
&& cd ${BUILD_PREFIX} \ && cd ${BUILD_PREFIX} \
&& cp config-template.json ${BUILD_PREFIX}/config.json \ && cp config-template.json ${BUILD_PREFIX}/config.json \
&& sed -i "2s/YOUR API KEY/${BUILD_OPEN_AI_API_KEY}/" ${BUILD_PREFIX}/config.json \
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ && /usr/local/bin/python -m pip install --no-cache --upgrade pip \
&& pip install --no-cache \ && pip install --no-cache \
itchat-uos==1.5.0.dev0 \ itchat-uos==1.5.0.dev0 \
openai
openai


WORKDIR ${BUILD_PREFIX} WORKDIR ${BUILD_PREFIX}




+ 1
- 1
docker/entrypoint.sh View File

@@ -9,7 +9,7 @@ CHATGPT_ON_WECHAT_CONFIG_PATH=${CHATGPT_ON_WECHAT_CONFIG_PATH:-""}
CHATGPT_ON_WECHAT_EXEC=${CHATGPT_ON_WECHAT_EXEC:-""} CHATGPT_ON_WECHAT_EXEC=${CHATGPT_ON_WECHAT_EXEC:-""}


# use environment variables to pass parameters # use environment variables to pass parameters
# if you have not defined environment variables, set them bwlow
# if you have not defined environment variables, set them below
export OPEN_AI_API_KEY=${OPEN_AI_API_KEY:-'YOUR API KEY'} export OPEN_AI_API_KEY=${OPEN_AI_API_KEY:-'YOUR API KEY'}
export OPEN_AI_PROXY=${OPEN_AI_PROXY:-""} export OPEN_AI_PROXY=${OPEN_AI_PROXY:-""}
export SINGLE_CHAT_PREFIX=${SINGLE_CHAT_PREFIX:-'["bot", "@bot"]'} export SINGLE_CHAT_PREFIX=${SINGLE_CHAT_PREFIX:-'["bot", "@bot"]'}


Loading…
Cancel
Save