From 4e6376cfc58e73fc14ddb691c0fac9da425efac9 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 28 Oct 2026 23:44:45 +0800 Subject: Add Debian base tarball creation and configurable initialization options. Signed-off-by: Richard Qin --- debian-container/README | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'debian-container/README') diff --git a/debian-container/README b/debian-container/README index 94a72e8..0749f14 100644 --- a/debian-container/README +++ b/debian-container/README @@ -5,6 +5,16 @@ Debian 容器 用法: +第一次创建基础软件包 tarball: + +sudo ./debian-container.sh base-create ./debian-stable.tar.gz + +从 tarball 创建容器: + +sudo ./debian-container.sh init --tarball ./debian-stable.tar.gz + +直接联网初始化容器: + sudo ./debian-container.sh init sudo ./debian-container.sh enter sudo ./debian-container.sh delete @@ -14,11 +24,24 @@ sudo ./debian-container.sh delete rootfs.ext4 debian-root/ +默认基础 tarball: + +debian-base.tar.gz + 可以通过环境变量修改路径: sudo env \ - RUTILS_DEBIAN_IMAGE=/path/to/rootfs.ext4 \ - RUTILS_DEBIAN_ROOT=/path/to/debian-root \ + DEBIAN_IMAGE=/path/to/rootfs.ext4 \ + DEBIAN_ROOT=/path/to/debian-root \ ./debian-container.sh enter +可配置的环境变量: + +DEBIAN_IMAGE 镜像路径 +DEBIAN_ROOT 挂载目录 +DEBIAN_TARBALL 默认基础 tarball 路径 +DEBIAN_SUITE Debian 版本,默认 stable +DEBIAN_MIRROR Debian 镜像地址 +DEBIAN_INCLUDE 额外软件包,使用逗号分隔 + 脚本实现按职责拆分在 lib/ 目录中,入口脚本只负责加载模块和分发命令。 -- cgit v1.2.3