socketd: preserve image-backed rootfs references in container summaries#142
Merged
Conversation
Container inventory records were exporting cfg->rootfs_path directly as the Docker-compatible Image field source. For directory-backed containers this works as expected, but Droidspaces loads regular-file and block-device rootfs_path entries into cfg->rootfs_img_path and clears cfg->rootfs_path. As a result, Portainer showed an empty Image column for image-backed containers, including sparse-image containers created by the Android app. Prefer cfg->rootfs_img_path when present, falling back to cfg->rootfs_path for directory-backed containers. This keeps /containers/json aligned with the pseudo-image inventory and restores the visible image/rootfs reference in Portainer. A bug in api_server.cpp causing incomplete information being sent has also been addressed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Container inventory records were exporting directly as the Docker-compatible Image field source.
For directory-backed containers this works as expected, but Droidspaces loads regular-file and block-device rootfs_path entries into cfg->rootfs_img_path and clears cfg->rootfs_path. As a result, Portainer showed an empty Image column for image-backed containers, including sparse-image containers created by the Android app.
Prefer cfg->rootfs_img_path when present, falling back to cfg->rootfs_path for directory-backed containers. This keeps /containers/json aligned with the pseudo-image inventory and restores the visible image/rootfs reference in Portainer.
<img width="2545" height="1395" alt="Debug API via Portainer" src="https://github.com/user-attachments/assets/0468b05d-84d7-45b8-9bf6-f525903bb99d" />A bug in api_server.cpp causing incomplete information being sent has also been addressed.