From 115550793eb7b9d76c3ee4aee545cbdd1ad51949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Tue, 1 Aug 2023 19:50:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=AD=A3=20python-oracledb=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- Dockerfile-ee | 11 +++++++++++ requirements/requirements_xpack.txt | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index d8fd27492..d49b98761 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ ARG DEPENDENCIES=" \ libpq-dev \ libffi-dev \ libjpeg-dev \ + libkrb5-dev \ libldap2-dev \ libsasl2-dev \ libssl-dev \ @@ -95,7 +96,6 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip install https://download.jumpserver.org/pypi/simple/cryptography/cryptography-38.0.4-cp39-cp39-linux_loongarch64.whl; \ pip install https://download.jumpserver.org/pypi/simple/greenlet/greenlet-1.1.2-cp39-cp39-linux_loongarch64.whl; \ pip install https://download.jumpserver.org/pypi/simple/PyNaCl/PyNaCl-1.5.0-cp39-cp39-linux_loongarch64.whl; \ - pip install https://download.jumpserver.org/pypi/simple/grpcio/grpcio-1.54.2-cp39-cp39-linux_loongarch64.whl; \ fi \ && pip install $(grep -E 'jms|jumpserver' requirements/requirements.txt) -i ${PIP_JMS_MIRROR} \ && pip install -r requirements/requirements.txt diff --git a/Dockerfile-ee b/Dockerfile-ee index 63c65d21c..127f25389 100644 --- a/Dockerfile-ee +++ b/Dockerfile-ee @@ -1,10 +1,21 @@ ARG VERSION FROM registry.fit2cloud.com/jumpserver/xpack:${VERSION} as build-xpack FROM jumpserver/core:${VERSION} +ARG TARGETARCH + COPY --from=build-xpack /opt/xpack /opt/jumpserver/apps/xpack WORKDIR /opt/jumpserver +ARG ORACLE_VERSION=1.4.0b1 RUN --mount=type=cache,target=/root/.cache/pip \ set -ex \ + && \ + if [ "${TARGETARCH}" == "amd64" ] || [ "${TARGETARCH}" == "arm64" ] || [ "${TARGETARCH}" == "loong64" ]; then \ + pip install https://download.jumpserver.org/pypi/simple/oracledb/oracledb-${ORACLE_VERSION}-cp39-cp39-linux_$(uname -m).whl; \ + fi \ + && \ + if [ "${TARGETARCH}" == "loong64" ]; then \ + pip install https://download.jumpserver.org/pypi/simple/grpcio/grpcio-1.54.2-cp39-cp39-linux_loongarch64.whl; \ + fi \ && pip install -r requirements/requirements_xpack.txt diff --git a/requirements/requirements_xpack.txt b/requirements/requirements_xpack.txt index 7704bbbd6..ad0abcefe 100644 --- a/requirements/requirements_xpack.txt +++ b/requirements/requirements_xpack.txt @@ -18,7 +18,7 @@ huaweicloud-sdk-python==1.0.21 # huaweicloud-sdk-python need keystoneauth1<=3.4.0 keystoneauth1==3.4.0 # DB requirements -oracledb==1.3.2 +# oracledb==1.3.2 psycopg2-binary==2.9.1 pymssql==2.2.8 IPy==1.1