refactor: improve build script and Dockerfile

- Translate rebuild.sh messages to English
- Add dockerfile syntax directive
- Fix heredoc syntax in Dockerfile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Timi
2026-01-19 11:05:43 +08:00
parent 50255a9093
commit 7d0c092002
2 changed files with 21 additions and 20 deletions

View File

@ -1,3 +1,4 @@
# syntax=docker/dockerfile:1
# Gitea Action Runner Java Image
# 基于 gitea_runner_base 添加多版本 JDK 和 Maven
@ -40,7 +41,7 @@ ENV JAVA_HOME=${JAVA_BASE}/java-17-openjdk
ENV PATH="${JAVA_HOME}/bin:${MAVEN_HOME}/bin:${PATH}"
# 创建版本切换脚本
RUN cat > /usr/local/bin/use-java << 'EOF'
RUN cat <<'EOF' > /usr/local/bin/use-java
#!/bin/bash
case "$1" in
7) export JAVA_HOME=/usr/lib/jvm/java-7-zulu ;;