info = demoController.info();
+ model.addAttribute("info", info);
+ return "index";
+ }
+}
diff --git a/demo/springboot-jar17/src/main/resources/application.yml b/demo/springboot-jar17/src/main/resources/application.yml
new file mode 100644
index 0000000..b2ab942
--- /dev/null
+++ b/demo/springboot-jar17/src/main/resources/application.yml
@@ -0,0 +1,26 @@
+server:
+ port: ${APP_PORT:8084}
+ shutdown: graceful
+
+spring:
+ application:
+ name: springboot-jar17
+ lifecycle:
+ timeout-per-shutdown-phase: 20s
+
+app:
+ name: springboot-jar17
+
+# 健康检查只需要端口探测,actuator 只暴露 health
+management:
+ endpoints:
+ web:
+ exposure:
+ include: health
+ endpoint:
+ health:
+ show-details: never
+
+logging:
+ level:
+ root: INFO
diff --git a/demo/springboot-jar17/src/main/resources/templates/index.html b/demo/springboot-jar17/src/main/resources/templates/index.html
new file mode 100644
index 0000000..5587d4b
--- /dev/null
+++ b/demo/springboot-jar17/src/main/resources/templates/index.html
@@ -0,0 +1,27 @@
+
+
+
+
+ springboot-jar17 运行信息
+
+
+
+springboot-jar17 运行信息
+
+
+ 其他接口:/api/info、/api/hello/{name}、/actuator/health
+
+
+
diff --git a/demo/springboot-jar17/startup.sh b/demo/springboot-jar17/startup.sh
new file mode 100755
index 0000000..cd50c07
--- /dev/null
+++ b/demo/springboot-jar17/startup.sh
@@ -0,0 +1,4 @@
+#!/usr/bin/env bash
+set -euo pipefail
+cd "$(dirname "$0")"
+docker-compose -f docker-compose.yml -p springboot-jar17-demo up -d
diff --git a/image/runtime-tomcat10/.dockerignore b/image/runtime-tomcat10/.dockerignore
new file mode 100644
index 0000000..d3f5903
--- /dev/null
+++ b/image/runtime-tomcat10/.dockerignore
@@ -0,0 +1,5 @@
+# 由 build.sh 预下载的 Tomcat 压缩包经 ADD 解压进镜像,
+# ADD 的源文件必须在构建上下文内,因此 *.tar.gz 不能在这里忽略
+build.sh
+.git/
+.DS_Store
diff --git a/image/runtime-tomcat10/.gitignore b/image/runtime-tomcat10/.gitignore
new file mode 100644
index 0000000..901b252
--- /dev/null
+++ b/image/runtime-tomcat10/.gitignore
@@ -0,0 +1,4 @@
+# 构建产物 / 本地缓存
+*.tar.gz
+*.sha512
+.DS_Store
diff --git a/image/runtime-tomcat10/Dockerfile b/image/runtime-tomcat10/Dockerfile
new file mode 100644
index 0000000..ce94696
--- /dev/null
+++ b/image/runtime-tomcat10/Dockerfile
@@ -0,0 +1,22 @@
+FROM registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-jdk17
+LABEL MAINTAINER="tianjun@odboy.cn"
+ENV TimeZone=Asia/Shanghai
+ENV CATALINA_HOME=/usr/local/tomcat
+ENV CATALINA_BASE=/usr/local/tomcat
+ENV PATH="${CATALINA_HOME}/bin:$PATH"
+WORKDIR /home/admin
+# https://archive.apache.org/dist/tomcat/tomcat-10/v10.1.34/bin/apache-tomcat-10.1.34.tar.gz
+# 由 build.sh 预先下载并校验 sha512 到本目录,ADD 直接解包得到 apache-tomcat-10.1.34/
+ADD apache-tomcat-10.1.34.tar.gz /usr/local/
+# curl 用于健康检查;nc 用于排障时探测端口
+RUN set -e && yum install \
+ curl \
+ nmap-ncat \
+ sysstat -y; \
+ mv /usr/local/apache-tomcat-10.1.34 ${CATALINA_HOME}; \
+ rm -rf ${CATALINA_HOME}/webapps/*; \
+ chmod +x ${CATALINA_HOME}/bin/*.sh; \
+ catalina.sh version;
+EXPOSE 8080
+# exec 形式:catalina.sh run 前台运行,docker stop 的 SIGTERM 可触发 Tomcat 优雅停机
+ENTRYPOINT ["catalina.sh", "run"]
diff --git a/image/runtime-tomcat10/build.sh b/image/runtime-tomcat10/build.sh
new file mode 100755
index 0000000..d99f91a
--- /dev/null
+++ b/image/runtime-tomcat10/build.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# 先下载 Tomcat 10.1.34 到当前目录并校验官方 sha512,再基于本地文件构建镜像
+# 官方包直接 ADD 解压,不解包重打:镜像内部与 Tomcat 发行版完全一致,便于对照文档排障
+set -euo pipefail
+cd "$(dirname "$0")"
+
+VERSION=10.1.34
+PKG=apache-tomcat-${VERSION}.tar.gz
+URL=https://archive.apache.org/dist/tomcat/tomcat-10/v${VERSION}/bin/${PKG}
+
+if [ ! -f "${PKG}" ]; then
+ curl -fL -o "${PKG}" "${URL}"
+ curl -fL -o "${PKG}.sha512" "${URL}.sha512"
+ # 校验官方 sha512,下载损坏或中间人改写时直接失败(sha512 文件格式: *<文件名>)
+ echo "$(awk '{print $1}' "${PKG}.sha512") ${PKG}" | shasum -a 512 -c -
+ rm -f "${PKG}.sha512"
+fi
+
+IMAGE=registry.cn-shanghai.aliyuncs.com/odboy/kenaito:runtime-tomcat10
+docker build -t "${IMAGE}" .
+docker push "${IMAGE}"