From c3a2bd70ffc9465816c0df8f6ead18ceb59034d6 Mon Sep 17 00:00:00 2001 From: lanvent Date: Sun, 26 Mar 2023 14:57:56 +0800 Subject: [PATCH] docker: remove unused command --- docker/Dockerfile.alpine | 4 +--- docker/Dockerfile.debian | 4 +--- docker/Dockerfile.latest | 6 ++---- docker/entrypoint.sh | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index 3dee604..167fabe 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' 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 \ bash \ @@ -22,7 +21,6 @@ RUN apk add --no-cache \ && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ && cd ${BUILD_PREFIX} \ && 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 \ && pip install --no-cache \ itchat-uos==1.5.0.dev0 \ diff --git a/docker/Dockerfile.debian b/docker/Dockerfile.debian index 8811470..a659433 100644 --- a/docker/Dockerfile.debian +++ b/docker/Dockerfile.debian @@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' 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 \ && apt-get install -y --no-install-recommends \ @@ -23,7 +22,6 @@ RUN apt-get update \ && rm chatgpt-on-wechat-${BUILD_GITHUB_TAG}.tar.gz \ && cd ${BUILD_PREFIX} \ && 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 \ && pip install --no-cache \ itchat-uos==1.5.0.dev0 \ diff --git a/docker/Dockerfile.latest b/docker/Dockerfile.latest index 2f415e5..061fa99 100644 --- a/docker/Dockerfile.latest +++ b/docker/Dockerfile.latest @@ -5,8 +5,7 @@ ARG TZ='Asia/Shanghai' 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 @@ -16,11 +15,10 @@ RUN apk add --no-cache \ && mv chatgpt-on-wechat ${BUILD_PREFIX} \ && cd ${BUILD_PREFIX} \ && 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 \ && pip install --no-cache \ itchat-uos==1.5.0.dev0 \ - openai + openai WORKDIR ${BUILD_PREFIX} diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index adc6624..5f798a6 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -9,7 +9,7 @@ CHATGPT_ON_WECHAT_CONFIG_PATH=${CHATGPT_ON_WECHAT_CONFIG_PATH:-""} CHATGPT_ON_WECHAT_EXEC=${CHATGPT_ON_WECHAT_EXEC:-""} # 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_PROXY=${OPEN_AI_PROXY:-""} export SINGLE_CHAT_PREFIX=${SINGLE_CHAT_PREFIX:-'["bot", "@bot"]'}