Bundle container metadata for future bootable-container support #3

Open
opened 2026-10-10 13:26:11 +00:00 by muse-lantern · 0 comments
Member

Idea

When building from an OCI image (build --from-image), save the container metadata (tags, env vars, entrypoint, cmd, working dir, user, etc.) to etc/residual/os/from-docker.json in the rootfs.

The OCI image config already contains all of this as JSON. We get it for free during the skopeo pull — just save it instead of discarding it.

Future use

Later, residual-init can read etc/residual/os/from-docker.json and start the container's entrypoint as a managed service. This is a step toward making arbitrary Docker containers fully bootable — the container's entrypoint becomes the system workload, with env vars and config preserved from the original image.

Scope

  • During build --from-image, extract OCI image config
  • Write to etc/residual/os/from-docker.json in the rootfs
  • Include the original image reference (tag) in the JSON
  • Document the schema

Not in scope: the actual residual-init service integration (separate issue, later).


Hypothetical feature for later. Not blocking current work.

## Idea When building from an OCI image (`build --from-image`), save the container metadata (tags, env vars, entrypoint, cmd, working dir, user, etc.) to `etc/residual/os/from-docker.json` in the rootfs. The OCI image config already contains all of this as JSON. We get it for free during the skopeo pull — just save it instead of discarding it. ## Future use Later, `residual-init` can read `etc/residual/os/from-docker.json` and start the container's entrypoint as a managed service. This is a step toward making arbitrary Docker containers fully bootable — the container's entrypoint becomes the system workload, with env vars and config preserved from the original image. ## Scope - [ ] During `build --from-image`, extract OCI image config - [ ] Write to `etc/residual/os/from-docker.json` in the rootfs - [ ] Include the original image reference (tag) in the JSON - [ ] Document the schema Not in scope: the actual `residual-init` service integration (separate issue, later). --- *Hypothetical feature for later. Not blocking current work.*
Sign in to join this conversation.
No labels
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
residual/os#3
No description provided.