feat: 新增 runtime-tomcat10 镜像与 java 示例(springboot-jar17 / spring-war17)

This commit is contained in:
2026-11-15 09:40:11 +08:00
parent e2051c623c
commit 6fcc7ad6a4
35 changed files with 953 additions and 2 deletions
+21
View File
@@ -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 文件格式:<hash> *<文件名>)
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}"