feat: builds support amd64+arm64

This commit is contained in:
Sun-ZhenXing
2026-01-01 22:38:08 +08:00
parent 922068b8af
commit ab07facdb1
10 changed files with 97 additions and 27 deletions

View File

@@ -1,5 +1,12 @@
# Debian DinD Configuration
# Global registry prefix (optional, e.g., docker.io/, ghcr.io/)
# GLOBAL_REGISTRY=
# Image versions
DEBIAN_DIND_VERSION=0.1.1
DEBIAN_DIND_GPU_VERSION=0.1.1-gpu
# Timezone (default: UTC)
TZ=UTC

View File

@@ -36,14 +36,20 @@ A Docker-in-Docker (DinD) service based on Debian, allowing you to run Docker in
Key environment variables (see `.env.example` for all options):
| Variable | Description | Default |
| ------------------------ | ----------------------------------- | ----------- |
| `DEBIAN_VERSION` | Debian base image version | `13.2-slim` |
| `DIND_PORT_OVERRIDE` | Host port for Docker daemon | `2375` |
| `INSTALL_NVIDIA_TOOLKIT` | Install NVIDIA toolkit during build | `false` |
| `TZ` | Timezone | `UTC` |
| `DIND_CPU_LIMIT` | CPU limit | `2.0` |
| `DIND_MEMORY_LIMIT` | Memory limit | `4G` |
| Variable | Description | Default |
| ------------------------- | ----------------------------------- | -------------------- |
| `GLOBAL_REGISTRY` | Global registry prefix (optional) | - |
| `DEBIAN_DIND_VERSION` | Main DinD image version | `0.1.1` |
| `DEBIAN_DIND_GPU_VERSION` | GPU-enabled DinD image version | `0.1.1-gpu` |
| `DEBIAN_VERSION` | Debian base image version | `13.2-slim` |
| `DIND_PORT_OVERRIDE` | Host port for Docker daemon | `2375` |
| `INSTALL_NVIDIA_TOOLKIT` | Install NVIDIA toolkit during build | `false` |
| `TZ` | Timezone | `UTC` |
| `DIND_CPU_LIMIT` | CPU limit | `2.0` |
| `DIND_MEMORY_LIMIT` | Memory limit | `4G` |
| `DIND_CPU_RESERVATION` | CPU reservation | `1.0` |
| `DIND_MEMORY_RESERVATION` | Memory reservation | `2G` |
| `DOCKER_TLS_CERTDIR` | TLS certificate directory | Empty (TLS disabled) |
## GPU Support

View File

@@ -36,14 +36,20 @@
主要环境变量(查看 `.env.example` 了解所有选项):
| 变量 | 说明 | 默认值 |
| ------------------------ | ------------------------- | ----------- |
| `DEBIAN_VERSION` | Debian 基础镜像版本 | `13.2-slim` |
| `DIND_PORT_OVERRIDE` | Docker 守护进程的主机端口 | `2375` |
| `INSTALL_NVIDIA_TOOLKIT` | 构建时安装 NVIDIA 工具包 | `false` |
| `TZ` | 时区 | `UTC` |
| `DIND_CPU_LIMIT` | CPU 限制 | `2.0` |
| `DIND_MEMORY_LIMIT` | 内存限制 | `4G` |
| 变量 | 说明 | 默认值 |
| ------------------------- | ------------------------- | ---------------- |
| `GLOBAL_REGISTRY` | 全局镜像仓库前缀(可选) | - |
| `DEBIAN_DIND_VERSION` | 主 DinD 镜像版本 | `0.1.1` |
| `DEBIAN_DIND_GPU_VERSION` | GPU 版本 DinD 镜像版本 | `0.1.1-gpu` |
| `DEBIAN_VERSION` | Debian 基础镜像版本 | `13.2-slim` |
| `DIND_PORT_OVERRIDE` | Docker 守护进程的主机端口 | `2375` |
| `INSTALL_NVIDIA_TOOLKIT` | 构建时安装 NVIDIA 工具包 | `false` |
| `TZ` | 时区 | `UTC` |
| `DIND_CPU_LIMIT` | CPU 限制 | `2.0` |
| `DIND_MEMORY_LIMIT` | 内存限制 | `4G` |
| `DIND_CPU_RESERVATION` | CPU 预留 | `1.0` |
| `DIND_MEMORY_RESERVATION` | 内存预留 | `2G` |
| `DOCKER_TLS_CERTDIR` | TLS 证书目录 | 空TLS 已禁用) |
## GPU 支持

View File

@@ -12,12 +12,15 @@ x-defaults: &defaults
services:
dind:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}alexsuntop/debian-dind:${DEBIAN_DIND_VERSION:-0.1.0}
image: ${GLOBAL_REGISTRY:-}alexsuntop/debian-dind:${DEBIAN_DIND_VERSION:-0.1.1}
profiles:
- ${COMPOSE_PROFILES:-}
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
args:
- DEBIAN_VERSION=${DEBIAN_VERSION:-13.2-slim}
- INSTALL_NVIDIA_TOOLKIT=${INSTALL_NVIDIA_TOOLKIT:-false}
@@ -47,12 +50,15 @@ services:
# GPU-enabled DinD (optional)
dind-gpu:
<<: *defaults
image: ${GLOBAL_REGISTRY:-}alexsuntop/debian-dind:${DEBIAN_DIND_GPU_VERSION:-0.1.0-gpu}
image: ${GLOBAL_REGISTRY:-}alexsuntop/debian-dind:${DEBIAN_DIND_GPU_VERSION:-0.1.1-gpu}
profiles:
- gpu
build:
context: .
dockerfile: Dockerfile
platforms:
- linux/amd64
- linux/arm64
args:
- DEBIAN_VERSION=${DEBIAN_VERSION:-13.2-slim}
- INSTALL_NVIDIA_TOOLKIT=true