chore: update mineru

This commit is contained in:
Sun-ZhenXing
2026-01-07 17:43:22 +08:00
parent 242ecdd53e
commit ea5eadfcec
17 changed files with 151 additions and 514 deletions

17
src/podman/.env.example Normal file
View File

@@ -0,0 +1,17 @@
# Podman Configuration
# Image version: quay.io/podman/stable
# Reference: https://quay.io/repository/podman/stable
PODMAN_VERSION=v5.7.1
# Host port for Podman API (default: 8888)
# PODMAN_PORT_OVERRIDE=8888
# Timezone
TZ=UTC
# Resource Limits
# PODMAN_CPU_LIMIT=2.0
# PODMAN_MEMORY_LIMIT=4G
# PODMAN_CPU_RESERVATION=1.0
# PODMAN_MEMORY_RESERVATION=2G

38
src/podman/README.md Normal file
View File

@@ -0,0 +1,38 @@
# Podman (Podman-in-Container)
[English](./README.md) | [中文](./README.zh.md)
This service provides a Podman environment running inside a container (Podman-in-Container). It allows you to run and manage OCI containers using Podman without installing it directly on your host.
## Quick Start
1. (Optional) Customize the configuration in `.env`.
2. Start the service:
```bash
docker compose up -d
```
3. You can either use the Podman API on port `8888` or execute commands directly:
```bash
docker compose exec podman podman info
```
## Services
- `podman`: The Podman engine service.
## Configuration
| Environment Variable | Description | Default |
| ---------------------- | -------------------------- | -------- |
| `PODMAN_VERSION` | Version of Podman image | `v5.7.1` |
| `PODMAN_PORT_OVERRIDE` | Host port for Podman API | `8888` |
| `TZ` | Timezone for the container | `UTC` |
| `PODMAN_CPU_LIMIT` | Maximum CPU usage | `2.0` |
| `PODMAN_MEMORY_LIMIT` | Maximum Memory usage | `4G` |
## Security Note
This container requires `privileged: true` to function correctly as it needs to manage container namespaces and mounts. Use it only in trusted environments.

38
src/podman/README.zh.md Normal file
View File

@@ -0,0 +1,38 @@
# Podman (容器内 Podman)
[English](./README.md) | [中文](./README.zh.md)
此服务提供一个运行在容器内的 Podman 环境Podman-in-Container。它允许你在不直接在主机上安装 Podman 的情况下,使用 Podman 运行和管理 OCI 容器。
## 快速开始
1. (可选)在 `.env` 中自定义配置。
2. 启动服务:
```bash
docker compose up -d
```
3. 你可以使用端口 `8888` 上的 Podman API或者直接执行命令
```bash
docker compose exec podman podman info
```
## 服务
- `podman`Podman 引擎服务。
## 配置
| 环境变量 | 描述 | 默认值 |
| ---------------------- | --------------------- | -------- |
| `PODMAN_VERSION` | Podman 镜像版本 | `v5.7.1` |
| `PODMAN_PORT_OVERRIDE` | Podman API 的主机端口 | `8888` |
| `TZ` | 容器的时区 | `UTC` |
| `PODMAN_CPU_LIMIT` | 最大 CPU 限制 | `2.0` |
| `PODMAN_MEMORY_LIMIT` | 最大内存限制 | `4G` |
## 安全说明
此容器需要 `privileged: true` 才能正常运行,因为它需要管理容器命名空间和挂载。请仅在受信任的环境中使用。

View File

@@ -0,0 +1,44 @@
# Podman (Podman-in-Container)
# High-quality container management tool for developing, managing, and running OCI Containers
x-defaults: &defaults
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
podman:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}quay.io/podman/stable:${PODMAN_VERSION:-v5.7.1}
#! Podman-in-Container usually requires privileged mode to manage containers
privileged: true
#! Optional: Enable Podman API service
command: podman system service --time=0 tcp:0.0.0.0:8888
ports:
- "${PODMAN_PORT_OVERRIDE:-8888}:8888"
volumes:
- podman_data:/var/lib/containers
#! Optional: volume for podman configs/registries
# - ./registries.conf:/etc/containers/registries.conf:ro
environment:
- TZ=${TZ:-UTC}
healthcheck:
test: ["CMD", "podman", "info"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: ${PODMAN_CPU_LIMIT:-2.0}
memory: ${PODMAN_MEMORY_LIMIT:-4G}
reservations:
cpus: ${PODMAN_CPU_RESERVATION:-1.0}
memory: ${PODMAN_MEMORY_RESERVATION:-2G}
volumes:
podman_data: