From 3b791adc3dddb2d98ae7fd3853bb5216c1c3c73f Mon Sep 17 00:00:00 2001 From: Job79 Date: Tue, 17 Nov 2026 19:18:50 +0100 Subject: [PATCH] docs: list the mkosi container's needs instead of a Containerfile Co-Authored-By: Claude Opus 5.5 --- Containerfile | 11 ----------- README.md | 9 +-------- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 Containerfile diff --git a/Containerfile b/Containerfile deleted file mode 100644 index 01e273f..0000000 --- a/Containerfile +++ /dev/null @@ -1,11 +0,0 @@ -# mkosi container -# -# Builds and boots a test VM where the host has no systemd, such as a dev -# container (README.md). mkosi vm needs systemd to run qemu in a scope, so -# systemd runs as init here and mkosi runs through podman exec. -FROM registry.fedoraproject.org/fedora:45 -RUN dnf install -y --setopt=install_weak_deps=False mkosi dbus-broker \ - qemu-kvm-core edk2-ovmf /usr/bin/systemd-repart openssh-clients && \ - dnf install -y --setopt=install_weak_deps=False $(mkosi dependencies) && \ - dnf clean all -CMD ["/sbin/init"] diff --git a/README.md b/README.md index f1e89d4..6137c9f 100644 --- a/README.md +++ b/README.md @@ -37,11 +37,4 @@ mkosi -f vm The `[Runtime]` section of `mkosi.conf` answers the setup, so it boots straight to a login (root, password `test`). Then `ssh -p 2222 claude@localhost` with your own key (`mkosi.credentials/agent.ssh-key`). -`mkosi vm` needs systemd on the host. Without it, such as in a dev container, run mkosi in a container with systemd ([Containerfile](Containerfile)): - -```sh -podman build -t mkosi-vm . -podman run -d --name mkosi --systemd=always --privileged --device /dev/kvm -v .:/repo -v ~/.ssh:/root/.ssh:ro -w /repo mkosi-vm -podman exec -it mkosi mkosi -f vm -podman exec -it mkosi ssh -p 2222 claude@localhost # in another terminal -``` +`mkosi vm` needs systemd on the host. Without it, such as in a dev container, run mkosi in a privileged container that boots systemd and has `mkosi qemu-kvm-core edk2-ovmf systemd-repart openssh-clients` and `$(mkosi dependencies)` installed, with `/dev/kvm` and the repository mounted.