Skip to content

Commit

Permalink
refactor: use subdirs for layers and overlay
Browse files Browse the repository at this point in the history
Signed-off-by: BioTheWolff <[email protected]>
  • Loading branch information
BioTheWolff committed Apr 22, 2024
1 parent 725171c commit 2ca435f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fs-gen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ fn main() {
let args = cli_args::CliArgs::get_args();
println!("Hello, world!, {:?}", args);

let layers_subdir = args.temp_directory.clone().join("layers/");
let overlay_subdir = args.temp_directory.clone().join("overlay/");

// TODO: better organise layers and OverlayFS build in the temp directory
match image_loader::download_image_fs(&args.image_name, args.temp_directory.clone()) {
match image_loader::download_image_fs(&args.image_name, layers_subdir) {
Err(e) => {
eprintln!("Error: {}", e);
return;
Expand All @@ -25,7 +28,7 @@ fn main() {
}

// FIXME: use a subdir of the temp directory instead
let path = Path::new("/tmp/cloudlet");
let path = Path::new(overlay_subdir.as_path());

merge_layer(&layers_paths, path);
create_init_file(path);
Expand Down

0 comments on commit 2ca435f

Please sign in to comment.