[PR #23] [MERGED] Honor image users for initialized volumes #25

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

📋 Pull Request Information

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

Base: docker-lxc-daemon ← Head: fix/honor-oci-user


📝 Commits (1)

  • 6054c57 Honor image users for initialized volumes

📊 Changes

8 files changed (+348 additions, -2 deletions)

View changed files

📝 internal/api/containers.go (+43 -2)
📝 internal/api/image_save.go (+3 -0)
📝 internal/api/images.go (+14 -0)
📝 internal/lxc/config.go (+4 -0)
📝 internal/lxc/manager.go (+4 -0)
➕ internal/lxc/volume_init.go (+213 -0)
📝 internal/oci/pull.go (+7 -0)
➕ internal/oci/pull_test.go (+60 -0)

📄 Description

Summary

  • preserve OCI image Volumes metadata during pull, inspect, save, and load
  • create anonymous volumes for image-declared VOLUME paths when clients do not send them explicitly
  • initialize empty daemon-managed volumes, and opt-in bind mounts, from the image destination owner/mode/content before LXC starts

Tests

  • go test ./internal/image ./internal/store ./internal/oci
  • go test ./... (blocked locally: missing lxc.pc / pkg-config dependency for github.com/lxc/go-lxc)

Contract

SmoothNAS can set io.lxc2docker.bind-mounts.init=image on containers whose bind sources it owns. LXC2Docker only touches empty directory sources, so existing user data is preserved.


🔄 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/23 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 5/17/2026 **Status:** ✅ Merged **Merged:** 5/17/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `docker-lxc-daemon` ← **Head:** `fix/honor-oci-user` --- ### 📝 Commits (1) - [`6054c57`](https://github.com/games-on-whales/LXC2Docker/commit/6054c570852285684c1bbbf3077417fa8d16b137) Honor image users for initialized volumes ### 📊 Changes **8 files changed** (+348 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `internal/api/containers.go` (+43 -2) 📝 `internal/api/image_save.go` (+3 -0) 📝 `internal/api/images.go` (+14 -0) 📝 `internal/lxc/config.go` (+4 -0) 📝 `internal/lxc/manager.go` (+4 -0) ➕ `internal/lxc/volume_init.go` (+213 -0) 📝 `internal/oci/pull.go` (+7 -0) ➕ `internal/oci/pull_test.go` (+60 -0) </details> ### 📄 Description ## Summary - preserve OCI image `Volumes` metadata during pull, inspect, save, and load - create anonymous volumes for image-declared `VOLUME` paths when clients do not send them explicitly - initialize empty daemon-managed volumes, and opt-in bind mounts, from the image destination owner/mode/content before LXC starts ## Tests - `go test ./internal/image ./internal/store ./internal/oci` - `go test ./...` (blocked locally: missing `lxc.pc` / pkg-config dependency for `github.com/lxc/go-lxc`) ## Contract SmoothNAS can set `io.lxc2docker.bind-mounts.init=image` on containers whose bind sources it owns. LXC2Docker only touches empty directory sources, so existing user data is preserved. --- <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:24 +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#25
No description provided.