Allow Portainer to detect Droidspaces#133
Merged
Merged
Conversation
Extend droidspaces-socketd from a backend bridge probe into the first public Socket API daemon usable by Portainer. The daemon now: - performs backend PING and CAPABILITIES handshake at startup - listens on unencrypted TCP via --listen-tcp - defaults to 0.0.0.0:2375 for early integration testing - serves Docker-compatible discovery endpoints: - GET/HEAD /_ping - GET /version - GET /info - versioned /vX.Y/... forms - emits compatibility headers such as Server, Api-Version, and Ostype - logs received HTTP request headers for bring-up debugging /version reports truthful Droidspaces version/platform metadata without fabricating Docker-specific Go build fields. /info is intentionally synthesized in socketd for now so Portainer can complete environment discovery. A clear TODO marks the path to replace or enrich it through DS_SOCKETD_OP_INFO once backend-side information marshalling is added. This is sufficient for Portainer to register Droidspaces as a connected standalone environment over localhost:2375.
Expose Docker-compatible container list routes through the socket extension: - GET /containers/json - GET /vX.Y/containers/json The extension parses the currently observed `all` query parameter and routes the request through a socketd-owned container-list seam. For now, the seam deliberately returns an empty JSON list. This keeps the core engine untouched while validating Portainer behavior at the public API boundary. Portainer accepts the endpoint and advances to subsequent snapshot probes for images, volumes, and networks, confirming that the next development step can replace this dummy seam with a core-backed DS_SOCKETD_OP_LIST_CONTAINERS implementation.
Extend the Socket API compatibility layer with additional extension-local endpoints observed during Portainer integration. Add dummy discovery responses for: - GET /images/json - GET /volumes - GET /networks These return structurally valid empty payloads so Portainer can complete its periodic snapshot pass without emitting image, volume, or network snapshot warnings. With these responses in place, the Portainer dashboard settles correctly. Add an initial /events implementation: - accepts since/until query parameters - returns Docker-compatible JSON object streams - maintains a small socketd-local event journal - records extension lifecycle events such as: - backend bridge connection - public TCP listener startup This keeps the implementation within src/socketd/ only. No core-engine changes are introduced; real core-backed inventory and lifecycle events remain deferred until the socket extension itself requires them. Portainer now: - loads the dashboard without the previous UI glitch - shows an empty event list before events exist - renders socketd lifecycle events once recorded
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 introduces the first public-facing
droidspaces-socketdAPI surfaceintended for Portainer/WebUI integration.
It builds on the already-merged private backend bridge and adds a standalone
C++ socket daemon that can be pointed at by Portainer over TCP.
Implemented
PINGCAPABILITIES--listen-tcp0.0.0.0:2375GET/HEAD /_pingGET /versionGET /info/vX.Y/...formsServer: DroidspacesApi-Version: 1.40Ostype: linuxNotes
/versionreports Droidspaces-specific truthful metadata and omitsDocker-specific fields such as
GoVersion./infois currently synthesized locally insocketdto allow Portainerenvironment discovery to proceed. A TODO comment marks this as transitional;
backend-authoritative data should later be supplied through
DS_SOCKETD_OP_INFO.Verification
With the Droidspaces backend bridge enabled and
droidspaces-socketdlistening on TCP port 2375, Portainer CE successfully registers the endpoint
as:
Portainer then proceeds to query: