From 7da5941183e849cdfb23321988194468dc9fa577 Mon Sep 17 00:00:00 2001 From: Odboy Date: Sat, 14 Feb 2026 21:33:46 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=9B=AE=E5=BD=95=E9=87=8D?= =?UTF-8?q?=E7=BB=84=EF=BC=8Cruntime-python3=E2=86=92runtime-python310?= =?UTF-8?q?=E3=80=81tools-ansible=E2=86=92app/ansible=E3=80=81dotnet6=20?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E2=86=92demo/dotnet6=EF=BC=8C=E5=B9=B6?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++---- {image/runtime-python3 => app/ansible}/.dockerignore | 0 {image/runtime-python3 => app/ansible}/.gitignore | 0 {image/tools-ansible => app/ansible}/Dockerfile | 0 {image/tools-ansible => app/ansible}/build.sh | 0 .../dotnet6}/.dockerignore | 0 .../compile-dotnet6-demo => demo/dotnet6}/.gitignore | 0 .../compile-dotnet6-demo => demo/dotnet6}/Demo.csproj | 0 .../compile-dotnet6-demo => demo/dotnet6}/Dockerfile | 0 .../compile-dotnet6-demo => demo/dotnet6}/Program.cs | 0 {image/compile-dotnet6-demo => demo/dotnet6}/build.sh | 0 .../dotnet6}/docker-compose.yml | 0 .../compile-dotnet6-demo => demo/dotnet6}/install.sh | 0 {image/compile-dotnet6-demo => demo/dotnet6}/run.md | 0 .../compile-dotnet6-demo => demo/dotnet6}/shutdown.sh | 0 .../{tools-ansible => runtime-python310}/.dockerignore | 0 image/{tools-ansible => runtime-python310}/.gitignore | 0 .../{runtime-python3 => runtime-python310}/Dockerfile | 6 +----- image/{runtime-python3 => runtime-python310}/build.sh | 0 image/{runtime-python3 => runtime-python310}/pip.conf | 0 image/tools-ansible/pip.conf | 5 ----- 21 files changed, 7 insertions(+), 14 deletions(-) rename {image/runtime-python3 => app/ansible}/.dockerignore (100%) rename {image/runtime-python3 => app/ansible}/.gitignore (100%) rename {image/tools-ansible => app/ansible}/Dockerfile (100%) rename {image/tools-ansible => app/ansible}/build.sh (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/.dockerignore (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/.gitignore (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/Demo.csproj (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/Dockerfile (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/Program.cs (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/build.sh (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/docker-compose.yml (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/install.sh (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/run.md (100%) rename {image/compile-dotnet6-demo => demo/dotnet6}/shutdown.sh (100%) rename image/{tools-ansible => runtime-python310}/.dockerignore (100%) rename image/{tools-ansible => runtime-python310}/.gitignore (100%) rename image/{runtime-python3 => runtime-python310}/Dockerfile (88%) rename image/{runtime-python3 => runtime-python310}/build.sh (100%) rename image/{runtime-python3 => runtime-python310}/pip.conf (100%) delete mode 100644 image/tools-ansible/pip.conf diff --git a/README.md b/README.md index a8c57b5..35352bb 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ ``` image/ 自建镜像:每个目录 = Dockerfile + build.sh,目录名即镜像 tag app/ 部署编排:每个目录 = docker-compose.yml + install.sh / shutdown.sh + run.md(+demo.png) + app/ansible 例外:基于 runtime-python310 构建 ansible 镜像 +demo/ 构建示例:演示如何基于 image/ 下的镜像做两阶段构建 ``` ### 使用约定 @@ -25,15 +27,15 @@ app/ 部署编排:每个目录 = docker-compose.yml + install.sh / shutdown | `image/runtime-jdk11` | `kenaito:runtime-jdk11` | 上者 / JDK 11 | 运行环境,仅 JDK | | `image/runtime-jdk17` | `kenaito:runtime-jdk17` | 上者 / JDK 17 | 运行环境,仅 JDK | | `image/runtime-jdk21` | `kenaito:runtime-jdk21` | 上者 / JDK 21.0.2 | 运行环境,仅 JDK | -| `image/runtime-python3` | `kenaito:runtime-python3` | 上者 / Python 3.10.0 | 运行环境,Python + pip 源(`pip.conf`) | +| `image/runtime-python310` | `kenaito:runtime-python310` | 上者 / Python 3.10.0 | 运行环境,Python + pip 源(`pip.conf`) | | `image/runtime-dotnet6` | `kenaito:runtime-dotnet6` | 上者 / ASP.NET Core 运行时 6.0.35 | 运行环境,仅运行时 | | `image/runtime-dotnet8` | `kenaito:runtime-dotnet8` | 上者 / ASP.NET Core 运行时 8.0.x | 运行环境,仅运行时 | | `image/runtime-dotnet9` | `kenaito:runtime-dotnet9` | 上者 / ASP.NET Core 运行时 9.0.x | 运行环境,仅运行时 | -| `image/compile-dotnet6` | `kenaito:compile-dotnet6` | 上者 / .NET SDK 6.0.427 | 编译环境(SDK + 编译工具链),附两阶段构建示例 `demo/` | +| `image/compile-dotnet6` | `kenaito:compile-dotnet6` | 上者 / .NET SDK 6.0.427 | 编译环境(SDK + 编译工具链),两阶段构建示例见 `demo/dotnet6` | | `image/compile-dotnet8` | `kenaito:compile-dotnet8` | 上者 / .NET SDK 8.0.403 | 编译环境(SDK + 编译工具链) | | `image/compile-dotnet9` | `kenaito:compile-dotnet9` | 上者 / .NET SDK 9.0.100-rc.2 | 编译环境(SDK + 编译工具链) | | `image/proxy-tengine3` | `kenaito:proxy-tengine3` | 上者 / Tengine 3.1.0 源码编译 | 反向代理 / Web 服务器,自定义 `nginx.conf` | -| `image/tools-ansible` | `kenaito:tools-ansible` | 上者 / Python 3.10.0 + Ansible | 运维工具镜像 | +| `app/ansible` | `kenaito:ansible` | 上者 / Ansible(基于 runtime-python310) | 运维工具镜像 | ### 部署编排 @@ -73,4 +75,4 @@ app/ 部署编排:每个目录 = docker-compose.yml + install.sh / shutdown - java 适用于 java 应用 - 编译与运行:`runtime-jdk*`(含 JDK,可直接编译后运行) - python 适用于 python 应用 - - 编译与运行:`runtime-python3`(已配置 pip 镜像源) + - 编译与运行:`runtime-python310`(已配置 pip 镜像源) diff --git a/image/runtime-python3/.dockerignore b/app/ansible/.dockerignore similarity index 100% rename from image/runtime-python3/.dockerignore rename to app/ansible/.dockerignore diff --git a/image/runtime-python3/.gitignore b/app/ansible/.gitignore similarity index 100% rename from image/runtime-python3/.gitignore rename to app/ansible/.gitignore diff --git a/image/tools-ansible/Dockerfile b/app/ansible/Dockerfile similarity index 100% rename from image/tools-ansible/Dockerfile rename to app/ansible/Dockerfile diff --git a/image/tools-ansible/build.sh b/app/ansible/build.sh similarity index 100% rename from image/tools-ansible/build.sh rename to app/ansible/build.sh diff --git a/image/compile-dotnet6-demo/.dockerignore b/demo/dotnet6/.dockerignore similarity index 100% rename from image/compile-dotnet6-demo/.dockerignore rename to demo/dotnet6/.dockerignore diff --git a/image/compile-dotnet6-demo/.gitignore b/demo/dotnet6/.gitignore similarity index 100% rename from image/compile-dotnet6-demo/.gitignore rename to demo/dotnet6/.gitignore diff --git a/image/compile-dotnet6-demo/Demo.csproj b/demo/dotnet6/Demo.csproj similarity index 100% rename from image/compile-dotnet6-demo/Demo.csproj rename to demo/dotnet6/Demo.csproj diff --git a/image/compile-dotnet6-demo/Dockerfile b/demo/dotnet6/Dockerfile similarity index 100% rename from image/compile-dotnet6-demo/Dockerfile rename to demo/dotnet6/Dockerfile diff --git a/image/compile-dotnet6-demo/Program.cs b/demo/dotnet6/Program.cs similarity index 100% rename from image/compile-dotnet6-demo/Program.cs rename to demo/dotnet6/Program.cs diff --git a/image/compile-dotnet6-demo/build.sh b/demo/dotnet6/build.sh similarity index 100% rename from image/compile-dotnet6-demo/build.sh rename to demo/dotnet6/build.sh diff --git a/image/compile-dotnet6-demo/docker-compose.yml b/demo/dotnet6/docker-compose.yml similarity index 100% rename from image/compile-dotnet6-demo/docker-compose.yml rename to demo/dotnet6/docker-compose.yml diff --git a/image/compile-dotnet6-demo/install.sh b/demo/dotnet6/install.sh similarity index 100% rename from image/compile-dotnet6-demo/install.sh rename to demo/dotnet6/install.sh diff --git a/image/compile-dotnet6-demo/run.md b/demo/dotnet6/run.md similarity index 100% rename from image/compile-dotnet6-demo/run.md rename to demo/dotnet6/run.md diff --git a/image/compile-dotnet6-demo/shutdown.sh b/demo/dotnet6/shutdown.sh similarity index 100% rename from image/compile-dotnet6-demo/shutdown.sh rename to demo/dotnet6/shutdown.sh diff --git a/image/tools-ansible/.dockerignore b/image/runtime-python310/.dockerignore similarity index 100% rename from image/tools-ansible/.dockerignore rename to image/runtime-python310/.dockerignore diff --git a/image/tools-ansible/.gitignore b/image/runtime-python310/.gitignore similarity index 100% rename from image/tools-ansible/.gitignore rename to image/runtime-python310/.gitignore diff --git a/image/runtime-python3/Dockerfile b/image/runtime-python310/Dockerfile similarity index 88% rename from image/runtime-python3/Dockerfile rename to image/runtime-python310/Dockerfile index 33857a5..4d0c357 100644 --- a/image/runtime-python3/Dockerfile +++ b/image/runtime-python310/Dockerfile @@ -15,20 +15,16 @@ RUN set -e && yum install \ 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; \ + cd /home/admin && rm -rf Python-3.10.0; \ mkdir ~/.pip; COPY pip.conf ~/.pip/ \ No newline at end of file diff --git a/image/runtime-python3/build.sh b/image/runtime-python310/build.sh similarity index 100% rename from image/runtime-python3/build.sh rename to image/runtime-python310/build.sh diff --git a/image/runtime-python3/pip.conf b/image/runtime-python310/pip.conf similarity index 100% rename from image/runtime-python3/pip.conf rename to image/runtime-python310/pip.conf diff --git a/image/tools-ansible/pip.conf b/image/tools-ansible/pip.conf deleted file mode 100644 index 4591cae..0000000 --- a/image/tools-ansible/pip.conf +++ /dev/null @@ -1,5 +0,0 @@ -[global] -index-url = https://mirrors.aliyun.com/pypi/simple - -[install] -trusted-host = mirrors.aliyun.com \ No newline at end of file