mirror of https://github.com/jumpserver/jumpserver
perf: update dependency (#14307)
* perf: update dependency * perf: remove source build * perf: Update Dockerfile with new base image tag * perf: use cache build * perf: Update Dockerfile with new base image tag * fix: variable incorrectly defined * perf: Update Dockerfile with new base image tag * fix: openpyxl fixed version * perf: Update Dockerfile with new base image tag * perf: remove cache * perf: Update Dockerfile with new base image tag * perf: update pyproject.toml * perf: Update Dockerfile with new base image tag * perf: remove cache * perf: Update Dockerfile with new base image tag --------- Co-authored-by: 吴小白 <296015668@qq.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>pull/14318/head
parent
044fd238b8
commit
8434d8d5ba
11
Dockerfile
11
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM jumpserver/core-base:20240924_031841 AS stage-build
|
||||
FROM jumpserver/core-base:20241022_023111 AS stage-build
|
||||
|
||||
ARG VERSION
|
||||
|
||||
|
@ -24,30 +24,27 @@ ENV LANG=en_US.UTF-8 \
|
|||
PATH=/opt/py3/bin:$PATH
|
||||
|
||||
ARG DEPENDENCIES=" \
|
||||
libldap2-dev \
|
||||
libx11-dev"
|
||||
|
||||
ARG TOOLS=" \
|
||||
ca-certificates \
|
||||
default-libmysqlclient-dev \
|
||||
openssh-client \
|
||||
sshpass \
|
||||
bubblewrap"
|
||||
|
||||
ARG APT_MIRROR=http://deb.debian.org
|
||||
|
||||
RUN set -ex \
|
||||
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& apt-get update > /dev/null \
|
||||
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
|
||||
&& apt-get -y install --no-install-recommends ${TOOLS} \
|
||||
&& apt-get clean \
|
||||
&& mkdir -p /root/.ssh/ \
|
||||
&& echo "Host *\n\tStrictHostKeyChecking no\n\tUserKnownHostsFile /dev/null\n\tCiphers +aes128-cbc\n\tKexAlgorithms +diffie-hellman-group1-sha1\n\tHostKeyAlgorithms +ssh-rsa" > /root/.ssh/config \
|
||||
&& echo "no" | dpkg-reconfigure dash \
|
||||
&& sed -i "s@# export @export @g" ~/.bashrc \
|
||||
&& sed -i "s@# alias @alias @g" ~/.bashrc
|
||||
&& apt-get clean all \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=stage-build /opt /opt
|
||||
COPY --from=stage-build /usr/local/bin /usr/local/bin
|
||||
|
|
|
@ -5,18 +5,10 @@ ARG TARGETARCH
|
|||
ARG DEPENDENCIES=" \
|
||||
ca-certificates \
|
||||
wget \
|
||||
g++ \
|
||||
make \
|
||||
pkg-config \
|
||||
default-libmysqlclient-dev \
|
||||
freetds-dev \
|
||||
gettext \
|
||||
libkrb5-dev \
|
||||
libldap2-dev \
|
||||
libsasl2-dev"
|
||||
|
||||
gettext"
|
||||
|
||||
ARG APT_MIRROR=http://deb.debian.org
|
||||
|
||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
|
||||
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=core \
|
||||
set -ex \
|
||||
|
@ -27,9 +19,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
|
|||
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
|
||||
&& echo "no" | dpkg-reconfigure dash
|
||||
|
||||
|
||||
# Install bin tools
|
||||
ARG CHECK_VERSION=v1.0.3
|
||||
ARG CHECK_VERSION=v1.0.4
|
||||
RUN set -ex \
|
||||
&& wget https://github.com/jumpserver-dev/healthcheck/releases/download/${CHECK_VERSION}/check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
|
||||
&& tar -xf check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz \
|
||||
|
@ -38,14 +29,13 @@ RUN set -ex \
|
|||
&& chmod 755 /usr/local/bin/check \
|
||||
&& rm -f check-${CHECK_VERSION}-linux-${TARGETARCH}.tar.gz
|
||||
|
||||
|
||||
# Install Python dependencies
|
||||
WORKDIR /opt/jumpserver
|
||||
|
||||
ARG PIP_MIRROR=https://pypi.org/simple
|
||||
ENV ANSIBLE_COLLECTIONS_PATHS=/opt/py3/lib/python3.11/site-packages/ansible_collections
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache,sharing=locked,id=core \
|
||||
RUN --mount=type=cache,target=/root/.cache \
|
||||
--mount=type=bind,source=poetry.lock,target=poetry.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
--mount=type=bind,source=utils/clean_site_packages.sh,target=clean_site_packages.sh \
|
||||
|
|
|
@ -15,14 +15,11 @@ ARG TOOLS=" \
|
|||
vim \
|
||||
wget"
|
||||
|
||||
ARG APT_MIRROR=http://deb.debian.org
|
||||
RUN set -ex \
|
||||
&& rm -f /etc/apt/apt.conf.d/docker-clean \
|
||||
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
|
||||
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends ${TOOLS} \
|
||||
&& echo "no" | dpkg-reconfigure dash
|
||||
&& apt-get clean all \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/jumpserver
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -16,60 +16,33 @@ documentation = "https://docs.jumpserver.org"
|
|||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
# cython = "3.0.0"
|
||||
aiofiles = "23.1.0"
|
||||
amqp = "5.1.1"
|
||||
ansible-core = { url = "https://github.com/jumpserver-dev/ansible/archive/refs/tags/v2.14.1.7.zip" }
|
||||
ansible = "7.1.0"
|
||||
ansible-runner = { url = "https://github.com/jumpserver-dev/ansible-runner/archive/refs/tags/2.4.0.1.zip" }
|
||||
asn1crypto = "1.5.1"
|
||||
bcrypt = "4.0.1"
|
||||
billiard = "4.1.0"
|
||||
# certifi = "2023.7.22"
|
||||
# cffi = "1.15.1"
|
||||
chardet = "5.1.0"
|
||||
configparser = "6.0.0"
|
||||
decorator = "5.1.1"
|
||||
docutils = "0.20.1"
|
||||
ecdsa = "0.18.0"
|
||||
enum-compat = "0.0.3"
|
||||
ephem = "4.1.4"
|
||||
future = "0.18.3"
|
||||
# idna = "3.4"
|
||||
itypes = "1.2.0"
|
||||
jinja2 = "3.1.2"
|
||||
markupsafe = "2.1.3"
|
||||
olefile = "0.46"
|
||||
paramiko = "3.2.0"
|
||||
passlib = "1.7.4"
|
||||
pyasn1 = "0.5.0"
|
||||
pycparser = "2.21"
|
||||
# cryptography = "41.0.2"
|
||||
pycryptodome = "3.18.0"
|
||||
pycryptodomex = "3.18.0"
|
||||
phonenumbers = "8.13.17"
|
||||
gmssl = "3.2.2"
|
||||
itsdangerous = "1.1.0"
|
||||
pyotp = "2.8.0"
|
||||
pynacl = "1.5.0"
|
||||
python-dateutil = "2.8.2"
|
||||
pyyaml = "6.0.1"
|
||||
requests = "2.31.0"
|
||||
jms-storage = "^0.0.59"
|
||||
simplejson = "3.19.1"
|
||||
six = "1.16.0"
|
||||
sshtunnel = "0.4.0"
|
||||
sshpubkeys = "3.3.1"
|
||||
uritemplate = "4.1.1"
|
||||
# urllib3 = "1.26.16"
|
||||
vine = "5.0.0"
|
||||
werkzeug = "2.3.6"
|
||||
unicodecsv = "0.14.1"
|
||||
httpsig = "1.3.0"
|
||||
treelib = "1.6.4"
|
||||
psutil = "5.9.5"
|
||||
psutil = "6.0.0"
|
||||
msrestazure = "0.6.4"
|
||||
adal = "1.2.7"
|
||||
# Requires fixed version number, ImportError: cannot import name 'save_virtual_workbook' from 'openpyxl.writer.excel'
|
||||
openpyxl = "3.0.10"
|
||||
pyexcel = "0.7.0"
|
||||
pyexcel-xlsx = "0.6.0"
|
||||
|
@ -90,10 +63,7 @@ django = "4.1.13"
|
|||
django-bootstrap3 = "23.4"
|
||||
django-filter = "23.2"
|
||||
django-formtools = "2.4.1"
|
||||
django-ranged-response = "0.2.0"
|
||||
django-simple-captcha = "0.5.18"
|
||||
django-timezone-field = "5.1"
|
||||
djangorestframework = "3.14.0"
|
||||
djangorestframework-bulk = "0.2.1"
|
||||
django-simple-history = "3.3.0"
|
||||
django-private-storage = "3.1"
|
||||
|
@ -101,33 +71,29 @@ drf-nested-routers = "0.93.4"
|
|||
drf-writable-nested = "0.7.0"
|
||||
rest-condition = "1.0.3"
|
||||
drf-yasg = "1.21.7"
|
||||
coreapi = "2.3.3"
|
||||
coreschema = "0.0.4"
|
||||
openapi-codec = "1.3.2"
|
||||
pillow = "10.0.1"
|
||||
pytz = "2023.3"
|
||||
django-proxy = "1.2.2"
|
||||
python-daemon = "3.0.1"
|
||||
eventlet = "0.33.3"
|
||||
greenlet = "3.0.1"
|
||||
gunicorn = "21.2.0"
|
||||
celery = "5.3.1"
|
||||
flower = "2.0.1"
|
||||
django-celery-beat = "2.6.0"
|
||||
kombu = "5.3.1"
|
||||
uvicorn = "0.22.0"
|
||||
websockets = "11.0.3"
|
||||
python-ldap = "3.4.3"
|
||||
python-ldap = [
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/python_ldap-3.4.3-cp311-cp311-manylinux_2_28_x86_64.whl", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/python_ldap-3.4.3-cp311-cp311-manylinux_2_28_aarch64.whl", markers = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
|
||||
{ version = "3.4.3", source = "aliyun", markers = "sys_platform != 'linux'" }
|
||||
]
|
||||
ldap3 = "2.9.1"
|
||||
django-radius = { url = "https://github.com/ibuler/django-radius/archive/refs/tags/1.5.0.zip" }
|
||||
django-cas-ng = { url = "https://github.com/ibuler/django-cas-ng/releases/download/v4.3.2/django-cas-ng-4.3.2.zip" }
|
||||
python-cas = "1.6.0"
|
||||
django-auth-ldap = "4.4.0"
|
||||
boto3 = "1.28.9"
|
||||
botocore = "1.31.9"
|
||||
s3transfer = "0.6.1"
|
||||
mysqlclient = "2.2.4"
|
||||
pymssql = "2.2.8"
|
||||
mysqlclient = [
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/mysqlclient-2.2.4-cp311-cp311-manylinux_2_28_x86_64.whl", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/mysqlclient-2.2.4-cp311-cp311-manylinux_2_28_aarch64.whl", markers = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
|
||||
{ version = "2.2.4", source = "aliyun", markers = "sys_platform != 'linux'" }
|
||||
]
|
||||
pymssql = "2.2.11"
|
||||
django-redis = "5.3.0"
|
||||
python-redis-lock = "4.0.0"
|
||||
pyopenssl = "23.2.0"
|
||||
|
@ -138,31 +104,24 @@ forgerypy3 = "0.3.1"
|
|||
django-debug-toolbar = "4.1.0"
|
||||
pympler = "1.0.1"
|
||||
hvac = "1.1.1"
|
||||
pyhcl = "0.4.4"
|
||||
ipy = "1.1"
|
||||
netifaces = "^0.11.0"
|
||||
netifaces = [
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/netifaces-0.11.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_28_x86_64.whl", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'" },
|
||||
{ url = "https://github.com/jumpserver-dev/core-package/releases/download/v1.0.0/netifaces-0.11.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", markers = "sys_platform == 'linux' and platform_machine == 'aarch64'" },
|
||||
{ version = "^0.11.0", source = "aliyun", markers = "sys_platform != 'linux'" }
|
||||
]
|
||||
daphne = "4.0.0"
|
||||
channels = "^4.0.0"
|
||||
channels-redis = "4.1.0"
|
||||
fido2 = "^1.1.2"
|
||||
ua-parser = "^0.18.0"
|
||||
user-agents = "^2.2.0"
|
||||
django-cors-headers = "^4.3.0"
|
||||
mistune = "2.0.3"
|
||||
openai = "^1.29.0"
|
||||
xlsxwriter = "^3.1.9"
|
||||
exchangelib = "^5.1.0"
|
||||
xmlsec = "^1.3.13"
|
||||
lxml = "5.2.1"
|
||||
pydantic = "^2.7.4"
|
||||
annotated-types = "^0.6.0"
|
||||
httpx = "^0.27.0"
|
||||
distro = "1.9.0"
|
||||
tqdm = "4.66.4"
|
||||
elasticsearch7 = "7.17.9"
|
||||
elasticsearch8 = "8.13.2"
|
||||
polib = "^1.2.0"
|
||||
# psycopg2 = "2.9.6"
|
||||
psycopg2-binary = "2.9.6"
|
||||
pycountry = "^24.6.1"
|
||||
|
||||
|
@ -183,11 +142,9 @@ bce-python-sdk = "0.8.87"
|
|||
tencentcloud-sdk-python = "3.0.941"
|
||||
aliyun-python-sdk-core-v3 = "2.13.33"
|
||||
aliyun-python-sdk-ecs = "4.24.64"
|
||||
keystoneauth1 = "5.2.1"
|
||||
oracledb = "1.4.0"
|
||||
ucloud-sdk-python3 = "0.11.50"
|
||||
huaweicloudsdkecs = "3.1.52"
|
||||
huaweicloudsdkcore = "3.1.52"
|
||||
volcengine-python-sdk = "1.0.71"
|
||||
|
||||
[[tool.poetry.source]]
|
||||
|
|
|
@ -18,7 +18,7 @@ for i in $need_clean; do
|
|||
done
|
||||
|
||||
# 清理缓存文件
|
||||
cd lib_path
|
||||
cd ${lib_path} || exit 1
|
||||
find . -name "*.pyc" -exec rm -f {} \;
|
||||
|
||||
# 清理不需要的国际化文件
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
command -v poetry >/dev/null 2>&1 || {
|
||||
command -v poetry >/dev/null 2>&1 || {
|
||||
echo "poetry not found. Aborting."
|
||||
exit 1
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue