You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-21Lines changed: 44 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
# docker2vm
2
2
3
-
`docker2vm` converts OCI container images (or Dockerfiles via BuildKit) into VM-compatible outputs. Today, the runtime materialization target is Gondolin.
3
+
`docker2vm` converts OCI container images (or Dockerfiles via BuildKit) into VM-compatible outputs. Today, the runtime materialization target is [Gondolin](https://github.com/earendil-works/gondolin).
4
4
5
-
It follows an OCI-first flow inspired by "Docker without Docker":
5
+
It follows an OCI-first flow inspired by ["Docker without Docker"](https://fly.io/blog/docker-without-docker/):
6
6
7
7
- resolve/pull an OCI image
8
8
- apply layers to a root filesystem
@@ -16,6 +16,7 @@ Docker containers share the host kernel. Gondolin runs workloads inside a VM, so
16
16
17
17
## Current features
18
18
19
+
- pinned Gondolin runtime dependency (`@earendil-works/gondolin@0.2.1`) for guest-asset retrieval
> On macOS, `docker2vm` checks common Homebrew `e2fsprogs` locations automatically; updating `PATH` is usually optional.
55
52
56
-
## Install
53
+
## Platform setup guides
57
54
58
-
```bash
59
-
bun install
60
-
```
55
+
-[macOS guide](./docs/macos.md)
56
+
-[Linux guide](./docs/linux.md)
61
57
62
58
## Quickstart
63
59
@@ -75,6 +71,32 @@ bun run build
75
71
bun run test:integration
76
72
```
77
73
74
+
The CI integration matrix currently validates:
75
+
76
+
-`alpine:3.20`
77
+
-`debian:bookworm-slim`
78
+
-`ubuntu:24.04`
79
+
-`fedora:41`
80
+
-`archlinux:latest`
81
+
82
+
For each distro row, tests run a distro-specific probe command (for example `/etc/debian_version`, `/etc/fedora-release`, etc.), assert that probe does **not** match on the base Gondolin guest image, and verify `/bin/busybox` executes inside the converted image.
83
+
84
+
### Choosing the build platform (`--platform`)
85
+
86
+
`--platform` selects which OCI image variant to convert, and should match the architecture you plan to run in Gondolin. This applies to both `oci2gondolin` and `dockerfile2gondolin`.
87
+
88
+
- Apple Silicon / arm64 Linux hosts: `linux/arm64`
89
+
- Intel / amd64 hosts: `linux/amd64`
90
+
- If omitted, both commands default from host arch (`x64 -> linux/amd64`, `arm64 -> linux/arm64`).
91
+
- You can always override manually with `--platform linux/amd64` or `--platform linux/arm64`.
92
+
93
+
For helper scripts:
94
+
95
+
-`e2e:smoke` uses `PLATFORM`
96
+
- integration tests use `INTEGRATION_PLATFORM`
97
+
98
+
Cross-arch builds are possible at image-selection time, but for reliable runtime execution you should use a platform that matches the runtime guest architecture.
## 2) Optional: add `e2fsprogs` binaries to `PATH`
19
+
20
+
With Homebrew, `e2fsprogs` is often keg-only. `docker2vm` checks common Homebrew locations automatically, so a PATH change is usually **not required** for normal usage.
21
+
22
+
If you want to run `mke2fs` / `debugfs` manually in your shell:
Use a platform that matches the architecture you will run in Gondolin.
61
+
62
+
- Apple Silicon (`uname -m` => `arm64`): use `linux/arm64`
63
+
- Intel Mac (`uname -m` => `x86_64`): use `linux/amd64`
64
+
65
+
`oci2gondolin` defaults automatically from host arch if `--platform` is omitted, but passing it explicitly is recommended.
66
+
67
+
Example:
68
+
69
+
```bash
70
+
bun run oci2gondolin -- \
71
+
--image busybox:latest \
72
+
--platform linux/arm64 \
73
+
--mode assets \
74
+
--out ./out/busybox-assets
75
+
```
76
+
77
+
## 7) Run integration + smoke checks
78
+
79
+
Apple Silicon:
80
+
81
+
```bash
82
+
INTEGRATION_PLATFORM=linux/arm64 bun run test:integration
83
+
PLATFORM=linux/arm64 bun run e2e:smoke
84
+
```
85
+
86
+
Intel Mac:
87
+
88
+
```bash
89
+
INTEGRATION_PLATFORM=linux/amd64 bun run test:integration
90
+
PLATFORM=linux/amd64 bun run e2e:smoke
91
+
```
92
+
93
+
## Troubleshooting
94
+
95
+
### `mke2fs` / `debugfs` not found
96
+
97
+
`docker2vm` should find common Homebrew locations automatically. If your install uses a custom prefix, either add it to `PATH` or point `GONDOLIN_GUEST_DIR` to prepared assets and verify `e2fsprogs` binaries are installed.
98
+
99
+
### Case-sensitive filename conflicts during conversion
100
+
101
+
Some images include paths that conflict on case-insensitive filesystems.
102
+
103
+
Use a case-sensitive APFS location for temporary work/output (for example, a case-sensitive volume) and retry.
0 commit comments