diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-10-29 02:12:35 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-10-29 02:12:35 +0800 |
| commit | 298dd9150ec8bc92af1bc1685726e1cd98d16b49 (patch) | |
| tree | dac8b52571821433123fb56ecc32b98fa229d996 /debian-container/README | |
| parent | d8bfc59e2f5dc0728326ae7a143f8fdc113932e2 (diff) | |
| download | rutils-298dd9150ec8bc92af1bc1685726e1cd98d16b49.tar.gz rutils-298dd9150ec8bc92af1bc1685726e1cd98d16b49.tar.xz | |
Add configurable host directory bind mounts for container entry and command execution.
Signed-off-by: Richard Qin <richard.qin.x@gmail.com>
Diffstat (limited to 'debian-container/README')
| -rw-r--r-- | debian-container/README | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debian-container/README b/debian-container/README index 15fd95b..b0e11fe 100644 --- a/debian-container/README +++ b/debian-container/README @@ -27,11 +27,14 @@ sudo ./debian-container.sh resize test-3 --size 12G sudo ./debian-container.sh enter test-1 sudo ./debian-container.sh enter test-1 --network host +sudo ./debian-container.sh enter test-1 --mount /home/richard/project:/workspace:rw +sudo ./debian-container.sh enter test-1 --mount /home/richard/data:/data:ro 在容器中执行命令: sudo ./debian-container.sh exec test-1 -- uname -a sudo ./debian-container.sh exec test-1 --network host -- apt-get update +sudo ./debian-container.sh exec test-1 --mount /home/richard/project:/workspace:rw -- make -C /workspace 列出和查看容器: @@ -74,4 +77,10 @@ DEBIAN_INCLUDE 额外软件包,使用逗号分隔 DEBIAN_EXCLUDE 要排除的软件包,使用逗号分隔 DEBIAN_NETWORK 默认网络模式,none 或 host +挂载参数格式: + +HOST:CONTAINER[:ro|rw] + +目前只支持目录挂载,默认模式为 rw。 + 脚本实现按职责拆分在 lib/ 目录中,入口脚本只负责加载模块和分发命令。 |
