mirror of
https://github.com/games-on-whales/LXC2Docker.git
synced 2026-10-16 05:12:04 +00:00
[PR #7] [MERGED] [codex] Expand Portainer API compatibility #8
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/LXC2Docker#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/games-on-whales/LXC2Docker/pull/7
Author: @JBailes
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @JBailes
Base:
docker-lxc-daemon← Head:aimee/session/8f4211c7📝 Commits (2)
73782b3Expand Portainer API compatibilitybea61aaImprove Portainer stats and changes📊 Changes
11 files changed (+1367 additions, -31 deletions)
View changed files
➕
internal/api/build.go(+18 -0)📝
internal/api/containers.go(+74 -2)➕
internal/api/containers_extra.go(+374 -0)➕
internal/api/events.go(+40 -0)📝
internal/api/images.go(+64 -0)📝
internal/api/router.go(+23 -6)📝
internal/api/system.go(+213 -11)📝
internal/api/types.go(+204 -0)➕
internal/api/volumes.go(+157 -0)📝
internal/lxc/manager.go(+68 -0)📝
internal/store/store.go(+132 -12)📄 Description
What changed
This expands the Docker-compatible API surface so Portainer can drive more of the daemon without falling through to 404s or hollow responses.
The patch adds support for:
system/dfvolumes/*with persistent local named volumesnetworks/*responses, including the defaultgowbridge/containers/{id}/stats/containers/{id}/changeshistory,tag, andsearch/eventsstreamMountssupport during container creation for named-volume requestsWhy
Portainer was probing a broader Docker API surface than the daemon previously implemented. That left several pages partially broken or fully unusable even when the core container lifecycle worked.
This PR moves those gaps from missing/stubbed routes to Docker-shaped responses that Portainer can consume.
Impact
Portainer should now be able to:
system/dfValidation
Local:
GOCACHE=/tmp/go-build-cache go test ./...Remote on
root@192.168.1.253after deploying the rebuilt daemon:GET /system/dfGET /networksGET /volumesPOST /volumes/createGET /images/search?term=ubuntuGET /images/<name>/historyPOST /images/<name>/tagGET /containers/<id>/changesGET /containers/<id>/stats?stream=0GET /eventsemitting a volume-create eventRemaining gaps
This still does not implement full Docker semantics for some Portainer features:
statsis lightweight and not real cgroup accounting yetchangescurrently returns an empty diff rather than a real filesystem deltabuildis still missingpushreturns501 Not Implemented🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.