
debuerreotype是一个专注于构建优化的Debian基础镜像的工具集合,旨在创建比官方Debian镜像更小、更安全且符合OCI标准的容器基础环境。该工具通过移除不必要的文件和依赖,优化镜像结构,从而生成精简、高效的基础镜像。
bashgit clone https://github.com/debuerreotype/debuerreotype.git cd debuerreotype
构建标准OCI镜像
bash./examples/oci-image.sh
构建Raspbian(ARM架构)镜像
bash./examples/raspbian.sh
可以通过修改脚本或设置环境变量来自定义构建过程:
bash# 构建特定版本的Debian DEBIAN_VERSION=buster ./examples/oci-image.sh # 设置镜像输出路径 OUTPUT_DIR=/path/to/output ./examples/oci-image.sh # 启用镜像压缩 COMPRESS=yes ./examples/oci-image.sh
bash#!/bin/bash set -euo pipefail # 定义变量 export DIST=buster export ARCH=amd64 export MIRROR=http://deb.debian.org/debian export OUTPUT=debian-${DIST}-${ARCH}-slim.tar.gz # 运行构建脚本 ./debuerreotype/scripts/debuerreotype-init \ --arch="${ARCH}" \ --mirror="${MIRROR}" \ "debian-${DIST}-${ARCH}" \ "${DIST}" ./debuerreotype/scripts/debuerreotype-minimize "debian-${DIST}-${ARCH}" ./debuerreotype/scripts/debuerreotype-apt-get "debian-${DIST}-${ARCH}" update ./debuerreotype/scripts/debuerreotype-apt-get "debian-${DIST}-${ARCH}" dist-upgrade -y ./debuerreotype/scripts/debuerreotype-cleanup "debian-${DIST}-${ARCH}" tar --numeric-owner -czf "${OUTPUT}" -C "debian-${DIST}-${ARCH}" .
bash#!/bin/bash set -euo pipefail # 定义变量 export DIST=bullseye export ARCH=armhf export MIRROR=http://raspbian.raspberrypi.org/raspbian/ export OUTPUT=raspbian-${DIST}-${ARCH}.tar.gz # 运行构建脚本 ./debuerreotype/scripts/debuerreotype-init \ --arch="${ARCH}" \ --mirror="${MIRROR}" \ --keyring=/usr/share/keyrings/raspbian-archive-keyring.gpg \ "raspbian-${DIST}-${ARCH}" \ "${DIST}" # 执行后续优化步骤(类似标准Debian构建) ./debuerreotype/scripts/debuerreotype-minimize "raspbian-${DIST}-${ARCH}" # ...其他优化命令... # 打包最终镜像 tar --numeric-owner -czf "${OUTPUT}" -C "raspbian-${DIST}-${ARCH}" .
| 参数 | 描述 | 示例 |
|---|---|---|
--arch | 指定目标架构 | --arch=armhf |
--mirror | 指定Debian镜像源 | --mirror=http://deb.debian.org/debian |
--keyring | 指定用于验证包的密钥环 | --keyring=/path/to/keyring.gpg |
--include | 指定要包含的额外包 | --include=ca-certificates,curl |
--exclude | 指定要排除的包 | --exclude=man-db,info |
| 变量 | 描述 | 默认值 |
|---|---|---|
DEBIAN_VERSION | 指定Debian版本 | bullseye |
OUTPUT_DIR | 输出目录路径 | 当前目录 |
COMPRESS | 是否压缩输出镜像 | no |
COMPRESS_FORMAT | 压缩格式 | gzip |
通过使用debuerreotype,开发者可以获得比官方镜像更小、更安全的Debian基础环境,从而构建更高效、更安全的容器化应用。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 版本下载页面。






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务