socketd: expose backend-backed Docker snapshot inventory for Portainer#138
Merged
Conversation
ravindu644
approved these changes
May 18, 2026
Ari4ka
approved these changes
May 18, 2026
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.
Summary
This extends the experimental
droidspaces-socketdWeb API path so that thePortainer-facing Docker-compatible snapshot endpoints are no longer dummy-only.
The previous socketd work established:
/containers/json/images/json/volumes/networks/eventsThis PR keeps the public HTTP compatibility layer in
src/socketd/, but addsthe privileged backend protocol and typed client plumbing needed to expose
real Droidspaces runtime state through those endpoints.
What changed
Private backend protocol
Extended the private socketd backend protocol with opcodes and capabilities for:
The protocol gains typed request/response records for:
The bridge dispatch path was also adjusted so payload-bearing opcodes can read
their own request bodies instead of all payloads being discarded before opcode
handling.
Backend bridge inventory
Implemented privileged backend handlers for:
LIST_CONTAINERSconfigs
NAT IP, custom init, PID, forwarded ports, and start timestamp
INFOLIST_IMAGEScontainer config
POLL_EVENTSCore lifecycle events
Added a small best-effort core event journal under the Droidspaces logs
workspace and record lifecycle events for:
These records are later consumed by the socketd backend event poller.
Typed C++ backend client
Extended
BackendClientwith typed methods for:list_containers()info()list_images()poll_events()This keeps binary bridge parsing out of the HTTP/JSON code paths.
Public socketd JSON projections
Replaced the snapshot dummy seams with backend-backed JSON generation:
/containers/jsoninventory
/volumescurrently has bind mounts rather than Docker-managed named volumes
/networksdroidspaces-bridgehostnone/eventsfetched from the privileged backend
/infoDesign notes
This continues the intended architecture for the WebUI daemon:
The snapshot projections are deliberately compatibility-oriented. They are not
intended to turn Droidspaces into Docker internally; they provide enough
Docker-shaped surface for Portainer to represent Droidspaces state while keeping
the underlying runtime model intact.
Current scope
This PR focuses on the snapshot/discovery surfaces Portainer requests during
environment loading and dashboard rendering.
It does not yet implement container lifecycle control routes such as:
POST /containers/{id}/startPOST /containers/{id}/stopThose remain natural follow-up work once the inventory-facing WebUI path is
accepted and tested further.