In short.
docker-in-machine is a smolvm skill for developers and coding assistants that need Docker inside a virtual machine, but both Docker data directories must remain on the VM's disk across restarts. The source reports macOS arm64 results on smolvm v1.29.0 and older Linux aarch64 results. It documents Windows kernel blockers through v1.22.2, inconsistent Linux x86_64 coverage statements, and no application-level validation of Compose or Testcontainers. The supplied scripts also require care around socket exposure and cleanup. Runtime behavior and isolation strength are not independently assessed.
Researched and written by an AI model and checked by a second AI model. How it works
The scope comprises all eleven captured files under docs/docker-in-machine: SKILL.md, README.md, two Smolfiles, five scripts and two references, plus the repository LICENSE and THIRD-PARTY-NOTICES.md. All are from revision 9890e8a28b06a03270de95488122535ba690210b, with snapshot content checksum 42b64a1e48a1ed48b119bc1c0df0148854edf57de07140b7dfbe6db0c238b7aa. The broader smolvm implementation, release binaries, linked examples, external documentation, related skills and dependency source trees are outside scope. Nothing was executed. Reported runs remain attributed to the source; runtime compatibility, actual application journeys and isolation guarantees are not independently assessed.
The overview
identity
docker-in-machine is the skill folder docs/docker-in-machine in the smol-machines/smolvm repository. It contains assistant instructions, two machine definitions, five Bash scripts, a README and two troubleshooting references. It configures an existing smolvm installation rather than providing a standalone Docker runtime.
Original source: [https://github.com/smol-machines/smolvm/tree/main/docs/docker-in-machine]. The captured revision is 9890e8a28b06a03270de95488122535ba690210b.
assessment
The skill addresses a specific problem: software inside a VM needs to start Docker containers itself. Its strongest contribution is explaining why a healthy Docker daemon can still fail to create containers, and why an older configuration can break after restarting the VM.
The documentation includes reported failures, recovery steps and explicit gaps. Its verification script checks more than daemon availability, but its success result does not establish full application compatibility, host-client access or security guarantees. Those distinctions matter when deciding whether it fits a development workflow.
users
The intended users are developers and coding assistants whose workloads call Docker: container-based test suites, Compose projects, image builds and agents that launch their own containers. Familiarity with a terminal, VM resources and Docker storage helps; the instructions explain the main failure modes but assume smolvm is already available.
If the goal is simply to boot an OCI container image, the README says smolvm does that without Docker. This additional daemon is useful when software specifically requires Docker's API or command line. Compose and Testcontainers themselves are outside the documented application tests.
capabilities
The scripts inspect host prerequisites, create and start a named VM, wait for or start Docker, check its storage driver and backing device, run small nested containers, and clean up recorded machines. They use the public smolvm command line.
Optional capabilities described in the README include bridging the guest Docker socket to the host, forwarding dynamically selected ports with auto_ports, and using Rosetta for amd64 containers on Apple silicon. These are not all exercised by the supplied verification script.
Using it
requirements
The scripts require Bash, standard command-line utilities and an installed smolvm binary discoverable on PATH or through SMOLVM. The preflight checks macOS hypervisor support or Linux read/write access to /dev/kvm. It also checks macOS socket-path length. These checks do not boot a VM or prove Docker works.
Both supplied machine definitions request two CPUs, 2048 MiB of memory, a 20 GiB storage disk and outbound networking. The documented Linux aarch64 runs used 1024 MiB because larger guests encountered host readiness limits; that is a reported configuration, not an established minimum.
The preflight rejects platforms other than macOS and Linux. Windows failures are documented on v1.14.2, with the same missing kernel features probed on v1.22.2. Newer Windows behavior is unknown.
mechanism
Docker creates layered filesystems for its containers. According to the source, smolvm's root filesystem uses an overlay backed by ramfs, which lacks the file-handle support needed for Docker's nested overlay. Both /var/lib/docker and /var/lib/containerd therefore need the VM's ext4 disk rather than its root overlay.
From smolvm v1.28.1, docker.smolfile uses the docker:dind image and declares both directories as disk volumes. The volumes are attached on every start, and the image starts the daemon. For v1.28.0 and earlier, the alternative configuration installs Docker and creates bind mounts during init. Since init runs only once, start-dockerd.sh must restore those mounts and start the daemon after subsequent starts.
setup
Obtain the whole skill folder with its relative paths intact. From that folder, the documented sequence begins with scripts/preflight.sh. For v1.28.1 and later, scripts/create-docker-machine.sh uses assets/docker.smolfile and defaults to the name smolskill-docker.
For v1.28.0 and earlier, the documented creation command is scripts/create-docker-machine.sh smolskill-docker assets/docker-bind-mounts.smolfile. On either configuration, run scripts/start-dockerd.sh and then scripts/verify-docker.sh. Repeat the start and verification steps after restarting the machine.
Both supplied configurations enable docker_socket. Disable it if no host tool needs access to guest Docker. A host Docker client is optional when all Docker-dependent code runs inside the VM.
example
For a provisioned machine named smolskill-docker, a minimal nested-container command is smolvm machine exec --name smolskill-docker -- docker run --rm alpine echo ok. The intended output is ok; no result from executing this command is established here.
For a coding agent or test runner, project files can be copied into the VM with machine cp or supplied through a mount at creation, then executed with machine exec. The supplied verification script instead uses small Alpine containers with fixed output markers. It does not run a project build, Compose stack or Testcontainers suite.
Assessment & evidence
limitations
Host-side Docker client access, Compose and Testcontainers are explicitly unverified in SKILL.md. Intel Mac hardware is also unverified. The README reports Linux x86_64 success on an unspecified build, whereas SKILL.md says that architecture was not run for this use case; a consistent released-version result is not established.
verify-docker.sh checks the backing device of /var/lib/docker but does not separately assert the device for /var/lib/containerd. Its host-network check runs an echo command using --network=host, demonstrating container startup in that mode rather than connectivity to a service. An absent host socket is reported without failing the overall result.
Creation and cleanup also have limits. create-docker-machine.sh records the requested name and proceeds to start even if creation fails, making existing-name collisions significant. Cleanup deletes recorded smolskill- machines with --cascade, which also removes their branch descendants. Its optional --reap mode sends SIGKILL to processes found by a broader scan, including matches based on the installation prefix rather than recorded machine names.
reasoning
The storage check is useful because daemon availability and container usability are separate questions. The source describes docker info succeeding on the wrong backing filesystem, followed by container failures. Checking the device and running a container therefore provide stronger evidence than querying Docker alone.
Restart verification matters for a different reason: files can persist on the storage disk while the bind mounts that expose them disappear. That explains how Docker can stop working without image data being lost. The newer disk-volume configuration addresses that lifecycle problem, while the older configuration depends on the recovery script.
The containment model relies on the VM boundary. A process that can open the forwarded guest Docker socket can control Docker inside the VM and access paths exposed to it. Mounts, outbound access and forwarded ports consequently affect what nested workloads can reach; the evidence does not establish the strength of that boundary.
alternatives
For an application that only needs an OCI image to run, the README recommends smolvm's native image support without adding Docker. When Docker is required, the folder offers the disk-volume configuration for v1.28.1 onward and the bind-mount configuration for older versions.
For the documented Windows kernel limitation, the reference suggests using the related dev-env or local-api material and running containers elsewhere. Those resources are outside this folder and are not assessed here. No comparative performance or security evidence for other runtimes is supplied.
evidence
The source snapshot was captured on 2026-11-16 at revision 9890e8a28b06a03270de95488122535ba690210b. A fixed-revision entry point is [https://raw.githubusercontent.com/smol-machines/smolvm/9890e8a28b06a03270de95488122535ba690210b/docs/docker-in-machine/SKILL.md].
SKILL.md contains author-reported macOS and Linux command results, including restart recovery and an initially failing storage-driver assertion. The Windows reference distinguishes an actual v1.14.2 Docker failure, inconclusive v1.14.6 image-pull failures, and v1.22.2 kernel probes. These are source reports rather than independently established execution results.
The supplied script text supports analysis of the checks and cleanup behavior. It does not establish successful execution, complete logs for every reported run, application compatibility or security assurance.
Access & freshness
costs
The repository's Apache-2.0 license grants rights without a license charge. The evidence supplies no commercial pricing, support fees or managed-cloud rates, so those costs are unknown.
The default configuration requests two CPUs, 2048 MiB of memory and a 20 GiB storage disk, and downloads images or packages. Actual host resource consumption, download volume, storage allocation and operating cost are not established.
rights
The repository LICENSE identifies Apache License 2.0 and copyright 2024–2025 smolvm contributors. It permits use, modification and redistribution subject to its conditions, including supplying the license, retaining applicable notices and marking modified files. It provides no warranty and does not grant general trademark rights.
The third-party notices concern libraries shipped in smolvm release bundles. They identify Apache-2.0, MIT, LGPL-2.1-only and GPL-2.0-only components, including libkrunfw and its bundled Linux kernel. Redistributing these skill files does not by itself include those binaries or Docker images, whose applicable terms must be considered separately.
freshness
The latest dated execution account is 2026-10-15 on macOS arm64 using smolvm v1.29.0. Linux aarch64 has a principal verification stamp for v1.18.2 on 2026-09-24 and a single reported v1.22.2 run on 2026-10-03. The latest documented Windows kernel probe is also v1.22.2 on 2026-10-03. v1.29.0 is a documented verification version, not an established latest release.
The modern configuration uses the unpinned docker:dind image, the verification script pulls unpinned Alpine, and the legacy configuration installs Docker without a package-version pin. Fixing the skill's repository revision therefore does not fix its entire runtime environment. Newer dependency and platform behavior remains unknown.
actions
Before adopting the skill, match the configuration to the installed smolvm version, check virtualization access and use a unique smolskill- machine name. Treat preflight readiness as a prerequisite check: it can report ready on hardware without a documented workload run.
Check both Docker data directories against the VM's disk, run the supplied container checks, and repeat them after a stop and start. Then exercise the actual build, Compose stack or Testcontainers suite that matters to the project. If a host tool needs the forwarded Docker socket, verify it with that client rather than relying on socket existence.
Keep the host's own Docker socket out of an untrusted guest, disable the guest socket bridge unless needed, and limit exposed paths and networking to the workload. Before cleanup, inspect the recorded names and branch descendants. Reserve --reap for cases where terminating every process found by its scan is intended.
