aboutsummaryrefslogtreecommitdiff
path: root/debian-container/README
diff options
context:
space:
mode:
Diffstat (limited to 'debian-container/README')
-rw-r--r--debian-container/README27
1 files changed, 25 insertions, 2 deletions
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/ 目录中,入口脚本只负责加载模块和分发命令。