diff options
| author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-01-14 04:46:42 +0000 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2026-02-09 03:32:52 +0000 |
| commit | fb238ac545516cacd05b085335f249a806261644 (patch) | |
| tree | 104a8d767b5f0bedf6d08fa0bc4ad21b35a0448a /docs/container-bundling.md | |
| parent | 98137ae789f28b91bcf10a0beef77f859fdc2310 (diff) | |
| download | meta-virtualization-fb238ac545516cacd05b085335f249a806261644.tar.gz | |
docs: add OCI multi-layer and vshell documentation
Update container-bundling.md with:
- New "OCI Multi-Layer Images" section explaining:
- Single vs multi-layer image differences
- OCI_BASE_IMAGE usage (recipe name or path)
- OCI_IMAGE_CMD vs OCI_IMAGE_ENTRYPOINT behavior
- When to use CMD (base images) vs ENTRYPOINT (wrapper tools)
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'docs/container-bundling.md')
| -rw-r--r-- | docs/container-bundling.md | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/container-bundling.md b/docs/container-bundling.md index ee2b5e31..fcbb4981 100644 --- a/docs/container-bundling.md +++ b/docs/container-bundling.md | |||
| @@ -105,6 +105,51 @@ work together: | |||
| 105 | - Usage: `BUNDLED_CONTAINERS = "autostart-test-container:docker:autostart"` | 105 | - Usage: `BUNDLED_CONTAINERS = "autostart-test-container:docker:autostart"` |
| 106 | 106 | ||
| 107 | 107 | ||
| 108 | OCI Multi-Layer Images | ||
| 109 | ---------------------- | ||
| 110 | |||
| 111 | By default, OCI images are single-layer (the entire rootfs in one layer). | ||
| 112 | To create multi-layer images with shared base layers, set `OCI_BASE_IMAGE`. | ||
| 113 | |||
| 114 | ### Single vs Multi-Layer | ||
| 115 | |||
| 116 | # Single layer (default) - full rootfs in one layer | ||
| 117 | inherit image image-oci | ||
| 118 | IMAGE_INSTALL = "base-files busybox myapp" | ||
| 119 | |||
| 120 | # Multi-layer - app layer on top of base layer | ||
| 121 | inherit image image-oci | ||
| 122 | OCI_BASE_IMAGE = "container-base" | ||
| 123 | IMAGE_INSTALL = "base-files busybox myapp" | ||
| 124 | |||
| 125 | ### OCI_BASE_IMAGE | ||
| 126 | |||
| 127 | Specifies the base image to build on top of: | ||
| 128 | |||
| 129 | | Value | Description | | ||
| 130 | |-------|-------------| | ||
| 131 | | Recipe name | `"container-base"` - uses OCI output from another recipe | | ||
| 132 | | Absolute path | `"/path/to/oci-dir"` - uses existing OCI layout | | ||
| 133 | |||
| 134 | For external images (docker.io, quay.io), use `container-bundle` with | ||
| 135 | `CONTAINER_BUNDLE_DEPLOY = "1"` to fetch and deploy them first. | ||
| 136 | |||
| 137 | ### OCI_IMAGE_CMD vs OCI_IMAGE_ENTRYPOINT | ||
| 138 | |||
| 139 | # CMD (default) - replaced when user passes arguments | ||
| 140 | OCI_IMAGE_CMD = "/bin/sh" | ||
| 141 | # docker run image → /bin/sh | ||
| 142 | # docker run image /bin/bash → /bin/bash | ||
| 143 | |||
| 144 | # ENTRYPOINT - always runs, args appended | ||
| 145 | OCI_IMAGE_ENTRYPOINT = "curl" | ||
| 146 | OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost" | ||
| 147 | # docker run image → curl http://localhost | ||
| 148 | # docker run image google.com → curl google.com | ||
| 149 | |||
| 150 | Use CMD for base images (flexible). Use ENTRYPOINT for wrapper tools. | ||
| 151 | |||
| 152 | |||
| 108 | Using BUNDLED_CONTAINERS | 153 | Using BUNDLED_CONTAINERS |
| 109 | ------------------------ | 154 | ------------------------ |
| 110 | 155 | ||
| @@ -245,6 +290,7 @@ Commands | |||
| 245 | |---------|-------------| | 290 | |---------|-------------| |
| 246 | | `vimport <path> [name:tag]` | Import OCI directory or tarball | | 291 | | `vimport <path> [name:tag]` | Import OCI directory or tarball | |
| 247 | | `vrun [opts] <image> [cmd]` | Run with entrypoint cleared | | 292 | | `vrun [opts] <image> [cmd]` | Run with entrypoint cleared | |
| 293 | | `vshell` | Open interactive shell inside VM (requires vmemres) | | ||
| 248 | | `clean` | Remove persistent state | | 294 | | `clean` | Remove persistent state | |
| 249 | | `vmemres start/stop/status` | Memory resident VM control | | 295 | | `vmemres start/stop/status` | Memory resident VM control | |
| 250 | 296 | ||
