Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Include list of image layer directories in ContainerInfo #294

Merged
merged 9 commits into from
Sep 18, 2024
Prev Previous commit
Next Next commit
chore: Fix clippy errors
vadorovsky committed Aug 26, 2024
commit cb77d171f77b28c9d41b96a4f538c4a0e0ff5fb9
4 changes: 2 additions & 2 deletions crates/bpf-common/src/containers/layers.rs
Original file line number Diff line number Diff line change
@@ -136,7 +136,7 @@ fn docker_btrfs_layers(image_id: &str) -> Result<Vec<PathBuf>, ContainerError> {

let mut layers = Vec::new();

let path = PathBuf::from(DOCKER_IMAGEDB_PATH).join(&image_id);
let path = PathBuf::from(DOCKER_IMAGEDB_PATH).join(image_id);
let file = File::open(&path).map_err(|source| ContainerError::ReadFile {
source,
path: path.clone(),
@@ -152,7 +152,7 @@ fn docker_btrfs_layers(image_id: &str) -> Result<Vec<PathBuf>, ContainerError> {
.last()
.ok_or(ContainerError::InvalidLayerID(layer_id.clone()))?;

let path = PathBuf::from(DOCKER_LAYERDB_PATH).join(&layer_id);
let path = PathBuf::from(DOCKER_LAYERDB_PATH).join(layer_id);
if path.exists() {
let path = path.join("cache-id");
let btrfs_subvol_id = fs::read_to_string(&path)