|
|
|
@ -312,12 +312,13 @@ fn save_container_info(args: &RockerArgs, container_id: &String) -> Result<()> {
|
|
|
|
|
fn show_containers() -> Result<()> {
|
|
|
|
|
let containers_path = Path::new(WORKSPACE).join("containers");
|
|
|
|
|
|
|
|
|
|
println!("{}{}{}{}{}", "id", "image", "run", "volume", "env");
|
|
|
|
|
for entry in fs::read_dir(containers_path)? {
|
|
|
|
|
let path = entry?.path();
|
|
|
|
|
let info_path = path.join("info.toml");
|
|
|
|
|
let info_str = fs::read_to_string(info_path)?;
|
|
|
|
|
let container_info: ContainerInfo = toml::from_str(&info_str)?;
|
|
|
|
|
println!("{container_info:?}");
|
|
|
|
|
println!("{}{}{}{:?}{:?}", container_info.id, container_info.image, container_info.run, container_info.volume, container_info.env);
|
|
|
|
|
}
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|