fix: 修正 python-oracledb 构建错误

pull/11161/head
吴小白 2023-08-01 19:50:07 +08:00 committed by Bryan
parent db28e98a02
commit 115550793e
3 changed files with 13 additions and 2 deletions

View File

@ -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

View File

@ -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

View File

@ -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