[PR #8] [MERGED] [codex] Continue Portainer compatibility work #10

Closed
opened 2026-10-15 12:51:15 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/8
Author: @JBailes
Created: 4/17/2026
Status: ✅ Merged
Merged: 4/17/2026
Merged by: @JBailes

Base: docker-lxc-daemon ← Head: aimee/session/portainer-next


📝 Commits (2)

  • ed28de0 Track custom network membership for Portainer
  • 9601903 Implement Portainer image builds

📊 Changes

8 files changed (+852 additions, -44 deletions)

View changed files

📝 internal/api/build.go (+600 -7)
📝 internal/api/containers.go (+6 -7)
📝 internal/api/containers_extra.go (+69 -0)
📝 internal/api/router.go (+1 -0)
📝 internal/api/system.go (+127 -8)
📝 internal/api/types.go (+20 -8)
📝 internal/lxc/manager.go (+5 -0)
📝 internal/store/store.go (+24 -14)

📄 Description

Summary

  • track custom network membership so Portainer network views and connect/disconnect flows have real backing metadata
  • implement a constrained but working /build path for basic single-stage Dockerfiles used through Portainer
  • harden image-template recovery for mixed old/new host state and fix raw LXC start behavior

Why

Portainer compatibility had improved enough for basic container and image flows, but custom networks were still mostly hollow and image builds still failed. This PR closes those next high-yield gaps.

Impact

  • Portainer can create, inspect, connect, disconnect, and delete custom networks with persisted container membership
  • Portainer image builds can succeed for practical single-stage Dockerfiles using FROM, WORKDIR, ENV, COPY, ADD, RUN, CMD, ENTRYPOINT, and EXPOSE
  • Build base images recover more gracefully when the host has stale image metadata but still has the ZFS-backed template dataset

Validation

  • GOCACHE=/tmp/go-build-cache go test ./...
  • validated custom-network flows on root@192.168.1.253 using a transient daemon socket
  • validated /build on root@192.168.1.253 by building portainer-build-validate:latest from a Dockerfile with FROM, WORKDIR, ENV, COPY, RUN, and CMD
  • verified the built image was registered via GET /images/portainer-build-validate:latest/json

Notes

  • /build is intentionally limited to a narrow single-stage subset rather than full Dockerfile parity
  • live docker-lxc-daemon.service on the host was left untouched during validation; testing used transient systemd-run instances

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/8 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 4/17/2026 **Status:** ✅ Merged **Merged:** 4/17/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `docker-lxc-daemon` ← **Head:** `aimee/session/portainer-next` --- ### 📝 Commits (2) - [`ed28de0`](https://github.com/games-on-whales/LXC2Docker/commit/ed28de0912b13ef19f36d6138e374f24c90d9d9a) Track custom network membership for Portainer - [`9601903`](https://github.com/games-on-whales/LXC2Docker/commit/960190371bb07579027f953b33eb74d49bb718ba) Implement Portainer image builds ### 📊 Changes **8 files changed** (+852 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `internal/api/build.go` (+600 -7) 📝 `internal/api/containers.go` (+6 -7) 📝 `internal/api/containers_extra.go` (+69 -0) 📝 `internal/api/router.go` (+1 -0) 📝 `internal/api/system.go` (+127 -8) 📝 `internal/api/types.go` (+20 -8) 📝 `internal/lxc/manager.go` (+5 -0) 📝 `internal/store/store.go` (+24 -14) </details> ### 📄 Description ## Summary - track custom network membership so Portainer network views and connect/disconnect flows have real backing metadata - implement a constrained but working `/build` path for basic single-stage Dockerfiles used through Portainer - harden image-template recovery for mixed old/new host state and fix raw LXC start behavior ## Why Portainer compatibility had improved enough for basic container and image flows, but custom networks were still mostly hollow and image builds still failed. This PR closes those next high-yield gaps. ## Impact - Portainer can create, inspect, connect, disconnect, and delete custom networks with persisted container membership - Portainer image builds can succeed for practical single-stage Dockerfiles using `FROM`, `WORKDIR`, `ENV`, `COPY`, `ADD`, `RUN`, `CMD`, `ENTRYPOINT`, and `EXPOSE` - Build base images recover more gracefully when the host has stale image metadata but still has the ZFS-backed template dataset ## Validation - `GOCACHE=/tmp/go-build-cache go test ./...` - validated custom-network flows on `root@192.168.1.253` using a transient daemon socket - validated `/build` on `root@192.168.1.253` by building `portainer-build-validate:latest` from a Dockerfile with `FROM`, `WORKDIR`, `ENV`, `COPY`, `RUN`, and `CMD` - verified the built image was registered via `GET /images/portainer-build-validate:latest/json` ## Notes - `/build` is intentionally limited to a narrow single-stage subset rather than full Dockerfile parity - live `docker-lxc-daemon.service` on the host was left untouched during validation; testing used transient `systemd-run` instances --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 12:51:15 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/LXC2Docker#10
No description provided.