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