From 2961bdb48be3d871edad2a2e67597d9efe2953c7 Mon Sep 17 00:00:00 2001 From: Odboy Date: Sat, 21 Feb 2026 21:07:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20runtime-python310=20=E7=B2=BE=E7=AE=80?= =?UTF-8?q?=E9=9D=9E=E5=BF=85=E9=9C=80=E6=9E=84=E5=BB=BA=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=B9=B6=E6=B8=85=E7=90=86=E6=BA=90=E7=A0=81=E6=A0=91=EF=BC=9B?= =?UTF-8?q?ansible=20=E6=94=B9=E4=B8=BA=E5=9F=BA=E4=BA=8E=20runtime-python?= =?UTF-8?q?310?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/ansible/Dockerfile | 33 ++------------------------------ app/ansible/build.sh | 9 +-------- image/runtime-python310/build.sh | 2 +- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/app/ansible/Dockerfile b/app/ansible/Dockerfile index 98f82d9..af1d09b 100644 --- a/app/ansible/Dockerfile +++ b/app/ansible/Dockerfile @@ -1,37 +1,8 @@ -FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:system-alinux3 +FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python310 LABEL MAINTAINER="tianjun@odboy.cn" ENV TimeZone=Asia/Shanghai -ENV PYTHON_HOME=/usr/local/python3 -ENV PATH="${PYTHON_HOME}/bin:$PATH" WORKDIR /home/admin -# https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz -# 由 build.sh 预先下载到本目录 -ADD Python-3.10.0.tgz ./ -RUN set -e && yum install \ - libffi-devel \ - zlib-devel \ - bzip2-devel \ - openssl-devel \ - ncurses-devel \ - sqlite-devel \ - readline-devel \ - tk-devel \ - gdbm-devel \ - libpcap-devel \ - xz-devel \ - make \ - patch \ - gcc \ - tar \ - sysstat \ - net-tools -y; \ - tar -xvf Python-3.10.0.tgz; \ - cd Python-3.10.0; \ - ./configure --prefix=/usr/local/python3; \ - make && make install; \ - python3 -V; \ - mkdir ~/.pip; -COPY pip.conf ~/.pip/ + RUN set -e && yum install -y \ epel-release \ ansible; \ No newline at end of file diff --git a/app/ansible/build.sh b/app/ansible/build.sh index d366446..613993d 100755 --- a/app/ansible/build.sh +++ b/app/ansible/build.sh @@ -3,13 +3,6 @@ set -euo pipefail cd "$(dirname "$0")" -PYTHON=Python-3.10.0.tgz -URL=https://www.python.org/ftp/python/3.10.0/${PYTHON} - -if [ ! -f "${PYTHON}" ]; then - curl -fL -o "${PYTHON}" "${URL}" -fi - -IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:tools-ansible +IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:ansible docker build -t "${IMAGE}" . docker push "${IMAGE}" diff --git a/image/runtime-python310/build.sh b/image/runtime-python310/build.sh index e0af636..095b5f9 100755 --- a/image/runtime-python310/build.sh +++ b/image/runtime-python310/build.sh @@ -10,6 +10,6 @@ if [ ! -f "${PYTHON}" ]; then curl -fL -o "${PYTHON}" "${URL}" fi -IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python3 +IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-python310 docker build -t "${IMAGE}" . docker push "${IMAGE}"