logo
0
0
Login
feat: log

准备一个 busybox 镜像

mkdir /tmp/busybox && cd /tmp/busybox docker export $(docker create busybox) -o busybox.tar tar -xf busybox.tar ls -lah
export RUST_LOG=debug cargo run -- run -it --rootfs=/tmp/busybox /bin/sh # 参数 # -it # -i:交互模式(保持 stdin 打开) # -t:分配伪终端(TTY) # 合起来 -it 用于启动一个可交互的终端会话,常用于调试或进入容器 # --rootfs=/tmp/busybox # 指定容器的根文件系统 # cmds # 容器的启动命令