Files
docker-files/README.md
Timi 18d19635cf feat: add Gitea Action Runner base and Java images
- gitea_runner_base: base image with common build tools (git, curl, wget, tar, etc.)
- gitea_runner_java: Java image with JDK 7/8/11/17/21 and Maven 3.9.9
- Update README with build instructions and usage examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:27:36 +08:00

57 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# docker-files
Gitea Action Runner Docker 镜像集合
## 镜像列表
### gitea_runner_base
基于 `gitea/act_runner` 的基础镜像,包含常用构建工具:
- 版本控制: git, git-lfs
- 网络工具: curl, wget, openssl
- 压缩工具: tar, gzip, bzip2, xz, zip, unzip
- 构建工具: make, bash, GNU 工具链
- 其他: jq, tree
```bash
docker build -t gitea_runner_base ./gitea_runner_base
```
### gitea_runner_java
基于 `gitea_runner_base` 的 Java 开发镜像,包含:
- JDK 7 (Azul Zulu)
- JDK 8, 11, 17, 21 (OpenJDK)
- Maven 3.9.9
```bash
docker build -t gitea_runner_java ./gitea_runner_java
```
**切换 JDK 版本:**
```bash
# 在容器内或 CI 脚本中
source use-java 8 # 切换到 JDK 8
source use-java 17 # 切换到 JDK 17
```
**直接指定 JAVA_HOME**
```yaml
# Gitea Action workflow 示例
env:
JAVA_HOME: /usr/lib/jvm/java-11-openjdk
```
## 构建顺序
```bash
# 1. 先构建基础镜像
docker build -t gitea_runner_base ./gitea_runner_base
# 2. 再构建语言环境镜像
docker build -t gitea_runner_java ./gitea_runner_java
```