From 0dee6904b59be30e61d45861e990459934b45468 Mon Sep 17 00:00:00 2001 From: a76yyyy Date: Sun, 12 Nov 2023 15:46:46 +0800 Subject: [PATCH] =?UTF-8?q?Build(docker):=20=F0=9F=8F=97=EF=B8=8F=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20cffi=20=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 +++-- Dockerfile.ja3 | 5 +++-- Dockerfile.lite | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index c2c3766b47d..df07e499591 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,7 @@ RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositorie py3-packaging py3-greenlet py3-urllib3 py3-cryptography \ py3-aiosignal py3-async-timeout py3-attrs py3-frozenlist \ py3-multidict py3-charset-normalizer py3-aiohttp \ - py3-typing-extensions py3-yarl && \ + py3-typing-extensions py3-yarl py3-cffi && \ [[ $(getconf LONG_BIT) = "32" ]] && \ echo "Tips: 32-bit systems do not support ddddocr, so there is no need to install numpy and opencv-python" || \ apk add --update --no-cache py3-numpy-dev py3-opencv py3-pillow && \ @@ -54,6 +54,7 @@ RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositorie sed -i '/aiohttp/d' requirements.txt && \ sed -i '/typing-extensions/d' requirements.txt && \ sed -i '/yarl/d' requirements.txt && \ + sed -i '/cffi/d' requirements.txt && \ pip install --no-cache-dir -r requirements.txt --break-system-packages && \ apk del .build_deps && \ sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ @@ -69,4 +70,4 @@ ENV TZ=CST-8 # 添加挂载点 VOLUME ["/usr/src/app/config"] -CMD ["sh","-c","python /usr/src/app/run.py"] \ No newline at end of file +CMD ["sh","-c","python /usr/src/app/run.py"] diff --git a/Dockerfile.ja3 b/Dockerfile.ja3 index 6aeb373402e..decc884b974 100644 --- a/Dockerfile.ja3 +++ b/Dockerfile.ja3 @@ -27,7 +27,7 @@ RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositorie apk add --update --no-cache python3 py3-six py3-markupsafe py3-pycryptodome py3-tornado \ py3-wrapt py3-packaging py3-greenlet py3-urllib3 py3-cryptography py3-aiosignal \ py3-async-timeout py3-attrs py3-frozenlist py3-multidict py3-charset-normalizer \ - py3-aiohttp py3-typing-extensions py3-yarl && \ + py3-aiohttp py3-typing-extensions py3-yarl py3-cffi && \ [[ $(getconf LONG_BIT) = "32" ]] && \ echo "Tips: 32-bit systems do not support ddddocr, so there is no need to install numpy and opencv-python" || \ apk add --update --no-cache py3-opencv py3-pillow && \ @@ -54,6 +54,7 @@ RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositorie sed -i '/aiohttp/d' requirements.txt && \ sed -i '/typing-extensions/d' requirements.txt && \ sed -i '/yarl/d' requirements.txt && \ + sed -i '/cffi/d' requirements.txt && \ pip install --no-cache-dir -r requirements.txt --break-system-packages && \ apk del .build_deps && \ sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ @@ -69,4 +70,4 @@ ENV TZ=CST-8 # 添加挂载点 VOLUME ["/usr/src/app/config"] -CMD ["sh","-c","python /usr/src/app/run.py"] \ No newline at end of file +CMD ["sh","-c","python /usr/src/app/run.py"] diff --git a/Dockerfile.lite b/Dockerfile.lite index 1ec0cfa0fe3..7955c0cad7b 100644 --- a/Dockerfile.lite +++ b/Dockerfile.lite @@ -14,7 +14,7 @@ WORKDIR /usr/src/app # QD & Pip install modules RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositories && \ # ln -s /usr/bin/python3 /usr/bin/python && \ - apk update && apk add --update --no-cache openssh-client python3 py3-six py3-markupsafe py3-pycryptodome py3-tornado py3-wrapt py3-packaging py3-greenlet py3-urllib3 py3-cryptography py3-aiosignal py3-async-timeout py3-attrs py3-frozenlist py3-multidict py3-charset-normalizer py3-aiohttp py3-typing-extensions py3-yarl && \ + apk update && apk add --update --no-cache openssh-client python3 py3-six py3-markupsafe py3-pycryptodome py3-tornado py3-wrapt py3-packaging py3-greenlet py3-urllib3 py3-cryptography py3-aiosignal py3-async-timeout py3-attrs py3-frozenlist py3-multidict py3-charset-normalizer py3-aiohttp py3-typing-extensions py3-yarl py3-cffi && \ chmod 600 /root/.ssh/id_rsa && \ ssh-keyscan gitee.com > /root/.ssh/known_hosts && \ let num=$RANDOM%100+10 && \ @@ -47,6 +47,7 @@ RUN sed -i 's/mirrors.ustc.edu.cn/dl-cdn.alpinelinux.org/g' /etc/apk/repositorie sed -i '/aiohttp/d' requirements.txt && \ sed -i '/typing-extensions/d' requirements.txt && \ sed -i '/yarl/d' requirements.txt && \ + sed -i '/cffi/d' requirements.txt && \ pip install --no-cache-dir -r requirements.txt --break-system-packages && \ apk del .build_deps && \ sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && \ @@ -63,4 +64,4 @@ ENV TZ=CST-8 # 添加挂载点 VOLUME ["/usr/src/app/config"] -CMD ["sh","-c","python /usr/src/app/run.py"] \ No newline at end of file +CMD ["sh","-c","python /usr/src/app/run.py"]