debian

arm32v7/debian Docker 镜像

Debian是一个完全由自由和开源软件组成的Linux发行版。

78 次收藏下载次数: 0状态:社区镜像维护者:arm32v7仓库类型:镜像最近更新:4 天前
下载命令
点击查看

arm32v7/debian Docker镜像文档

镜像概述与主要用途

arm32v7/debian 是 Debian 官方 Docker 镜像的 arm32v7 架构专用版本,基于 Debian 操作系统构建。Debian 是一款以自由开源软件为核心的 Linux 发行版,广泛用于个人计算机和服务器,也是众多其他 Linux 发行版的基础。本镜像专为 32 位 ARM 架构(如树莓派等嵌入式设备)优化,旨在提供最小化、可靠的基础运行环境,适用于应用开发、测试及部署。

核心功能与特性

1. 多版本与变体支持

  • 稳定版:如 bookworm(Debian 12)、bullseye(Debian 11)等,提供长期支持(LTS)。
  • 滚动更新版:如 stable、testing、unstable,跟踪 Debian 滚动发布分支。
  • 精简版(slim):通过移除文档、man 页等非必要文件进一步减小体积(如 bookworm-slim)。
  • 其他变体:包括 backports(提供新版软件包)、experimental(实验性分支)等。

2. 最小化设计

基于 Debian debootstrap 工具的 minbase 变体构建,仅包含核心必需软件包,确保最小镜像体积,同时保留 Debian 系统完整性。

3. 可重现构建

使用 debuerreotype 工具链构建,确保镜像透明可追溯,支持通过相同工具链重现相同 rootfs 环境。

4. 架构兼容性

专为 arm32v7 架构优化,适用于 32 位 ARM 设备(如 ARM Cortex-A 系列处理器)。

使用场景与适用范围

  • 嵌入式设备开发:作为树莓派、ARM 开发板等设备的基础镜像,构建应用运行环境。
  • 轻量级容器部署:适用于资源受限场景,通过 slim 变体进一步降低资源占用。
  • 多版本测试:支持在同一设备上快速切换 Debian 稳定版、测试版环境,验证应用兼容性。
  • 基础镜像构建:作为上层应用(如数据库、Web 服务)的基础镜像,提供标准化 Debian 环境。

支持的标签与说明

标签说明Dockerfile 链接
bookworm, bookworm-20250929, 12.12, 12Debian 12(bookworm)稳定版https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/bookworm/oci/index.json
bookworm-slim, bookworm-20250929-slim, 12.12-slim, 12-slimDebian 12 精简版https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/bookworm/slim/oci/index.json
bullseye, bullseye-20250929, 11.11, 11Debian 11(bullseye)稳定版https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/bullseye/oci/index.json
stable, stable-20250929跟踪 Debian 稳定版滚动分支https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/stable/oci/index.json
testing, testing-20250929跟踪 Debian 测试版滚动分支https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/testing/oci/index.json
sid, unstableDebian 不稳定版(滚动更新)https://github.com/debuerreotype/docker-debian-artifacts/blob/225288ca98614cb7e6f1c051b8bb982a42f215cf/sid/oci/index.json

使用方法与配置说明

1. 镜像拉取

通过 docker pull 命令拉取指定标签的镜像:

bash
# 拉取最新稳定版(bookworm,Debian 12)
docker pull docker.xuanyuan.run/arm32v7/debian:latest

# 拉取指定版本(如 bullseye-slim)
docker pull docker.xuanyuan.run/arm32v7/debian:bullseye-slim

2. 基本容器运行

运行交互式容器(适用于调试或临时操作):

bash
# 启动 bash 交互终端(--rm 表示退出后自动删除容器)
docker run -it --rm docker.xuanyuan.run/arm32v7/debian:bookworm bash

3. 环境变量配置

本地化设置(Locale)

默认仅包含 C、C.UTF-8 和 POSIX locale。如需其他 locale(如 en_US.UTF-8),需手动安装:

bash
# 在容器内执行:安装 locales 包并生成 en_US.UTF-8
apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/*
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

# 或在 Dockerfile 中预配置
ENV LANG en_US.utf8
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
    && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8

其他常用环境变量

可通过 -e 参数传递自定义环境变量,例如:

bash
docker run -it --rm -e LANG=C.UTF-8 -e APP_ENV=production docker.xuanyuan.run/arm32v7/debian:bookworm

4. 安装额外软件包

通过 apt-get 管理软件包(需先更新索引):

bash
# 在容器内安装 curl 和 git
apt-get update && apt-get install -y curl git && rm -rf /var/lib/apt/lists/*

5. 数据持久化

通过挂载主机目录到容器,实现数据持久化:

bash
# 将主机当前目录挂载到容器的 /app 目录
docker run -it --rm -v $(pwd):/app docker.xuanyuan.run/arm32v7/debian:bookworm bash

6. Docker Compose 示例

创建 docker-compose.yml 配置文件,定义服务:

yaml
version: '3'
services:
  debian-app:
    image: docker.xuanyuan.run/arm32v7/debian:bookworm-slim
    container_name: my-debian-app
    environment:
      - LANG=C.UTF-8
    volumes:
      - ./app-data:/data  # 挂载主机目录到容器
    command: bash -c "apt-get update && apt-get install -y python3 && python3 --version"

启动服务:

bash
docker-compose up

构建说明

镜像构建流程

  1. rootfs 生成:使用 debuerreotype 工具构建 Debian rootfs,基于 minbase 变体,仅包含核心包。
  2. slim 变体优化:通过 debuerreotype-slimify 脚本移除文档、man 页、静态库等非必要文件,减小体积。
  3. 多架构支持:通过 docker-debian-artifacts 脚本生成各架构(含 arm32v7)的 Dockerfile 及 metadata。

镜像元数据

  • 包版本信息、构建时间戳等元数据可在 https://github.com/debuerreotype/docker-debian-artifacts 仓库的 dist-arm32v7 分支查看。

问题反馈与支持

  • 提交 Issue:https://github.com/debuerreotype/docker-debian-artifacts/issues
  • 获取帮助:
    • Docker 社区 Slack:https://dockr.ly/comm-slack
    • Stack Overflow、Server Fault 等技术社区(标签 debian、docker)

许可证

镜像中软件包的许可证遵循 Debian 项目许可协议,主要为 GNU GPL、MIT 等自由开源许可证。具体软件包许可证信息可通过以下途径获取:

  • https://www.debian.org/social_contract#guidelines
  • https://github.com/docker-library/repo-info/tree/master/repos/debian(自动检测的许可证元数据)

使用镜像时,需确保遵守所有包含软件的许可证要求。

镜像拉取方式

您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

轩辕镜像加速拉取命令点我查看更多 debian 镜像标签

docker pull docker.xuanyuan.run/arm32v7/debian:<标签>

DockerHub 原生拉取命令

docker pull arm32v7/debian:<标签>
专业版 · 高速稳定拉取镜像
50GB 仅 ¥8/年
高速镜像下载在线技术支持专业版保障服务可用付费会员免广告