Docktor is a lightweight Docker environment for macOS powered by QEMU.
It automatically provisions a Linux VM, installs Docker Engine inside the VM, and configures your local Docker CLI to use it through a dedicated Docker context.
No Docker Desktop required.
The name Docktor comes from Docker + Doctor.
- macOS Apple Silicon (arm64)
- macOS Intel (x86_64)
brew tap fullstack-sargis/docktor
brew install fullstack-sargis/docktor/docktorVerify the installation:
docktor --versionIf Homebrew skips the tap as untrusted, trust it locally and retry:
brew trust fullstack-sargis/docktor
brew install fullstack-sargis/docktor/docktorClone the repository and build Docktor locally:
git clone https://github.com/fullstack-sargis/docktor.git
cd docktor
./gradlew test
./gradlew installDistThe generated CLI script is:
build/install/docktor/bin/docktorBuild a native binary when GraalVM native-image is available:
./gradlew nativeCompileThe generated native binary is:
build/native/nativeCompile/docktor-
macOS host.
-
Java 21 to build and run the JVM distribution, or the native
docktorbinary. -
QEMU tools:
qemu-system-aarch64on Apple Silicon.qemu-system-x86_64on Intel Macs.qemu-img.
-
Docker CLI.
-
SSH client.
Install required dependencies with Homebrew:
brew install qemu
brew install dockerDocker Desktop is not required.
Run a health check:
docktor doctorStart the VM:
docktor startVerify Docker connectivity:
docker run hello-worldCheck status:
docktor statusStop the VM:
docktor stopExample status output:
✅ QEMU VM status
✅ Docker daemon is reachable
✅ Docker context: docktor
docktor doctor
docktor start
docktor stop
docktor status
docktor sshdocktor qemu status
docktor qemu start
docktor qemu stop
docktor qemu ssh
docktor qemu reset
docktor docker check
docktor docker contextWhen started, Docktor:
- Creates and manages a lightweight Linux VM using QEMU.
- Boots the VM using cloud-init.
- Installs and starts Docker Engine inside the VM.
- Configures a Docker context named
docktor. - Routes local Docker CLI commands to the VM over SSH.
From that point forward, standard Docker commands work normally:
docker ps
docker images
docker run hello-worldDocktor stores all VM-related files under:
~/.docktor/
Important files and directories:
-
QEMU working directory:
~/.docktor/qemu/
-
VM disk:
~/.docktor/qemu/docktor.qcow2
-
Cloud-init files:
~/.docktor/qemu/seed/~/.docktor/qemu/seed.iso~/.docktor/qemu/seed.iso.cdr
-
Logs and runtime files:
~/.docktor/qemu/docktor-qemu.log~/.docktor/qemu/docktor-qemu.pid~/.docktor/qemu/serial.log
Docktor also creates:
-
Docker context:
docktor
-
SSH config entry:
docktor-vm
The Docker context uses:
ssh://docktor-vm
Prebuilt binaries are available on the GitHub Releases page.
Each release includes:
- macOS arm64 native binary
- macOS x64 native binary
- SHA256 checksums
The first boot may take several minutes while cloud-init installs packages and starts Docker inside the VM.
Check progress:
docktor statusRetry after the VM reports that Docker is reachable.
Switch to Docktor's Docker context:
docker context use docktorYou can also recreate and select the context with:
docktor docker contextIf the VM was recreated, your SSH client may refuse the connection because the host key changed.
Remove the old key:
ssh-keygen -R "[127.0.0.1]:2222"Docktor's generated SSH configuration disables strict host-key checking for the docktor-vm alias used by the Docker context, but direct SSH commands may still use entries from your local known_hosts file.
Verify QEMU is available:
qemu-system-aarch64 --versionor on Intel Macs:
qemu-system-x86_64 --versionInstall QEMU with:
brew install qemuVerify Docker CLI availability:
docker --versionInstall it with:
brew install docker