docker eqty
Reference for the docker eqty CLI plugin, which starts the TPM-enabled Docker VM on a Mac on demand and runs commands in it, and for its settings.
docker eqty is a Docker CLI plugin, also runnable standalone as docker-eqty, that runs Docker
commands against the notary-backed TPM VM on a Mac. It starts the VM if it is stopped, creating the
vTPM on first use, and leaves your default Docker context as it was. It is installed by the
eqty-docker package; see the Quick Start.
docker eqty use vz # once: pick the Virtualization.framework flavour
docker eqty run --rm hello-world # starts the VM first if needed
docker eqty compose up -d
docker eqty status
docker eqty stopEvery command that is not one of the plugin’s own below goes to the TPM VM’s Docker context. Compose files pass through unchanged.
Commands
| Command | What it does |
|---|---|
use vz|qemu [vm name] [vtpm id] | Picks the flavour: vz is a Virtualization.framework VM through vfkit, qemu a Colima VM. Optionally names the VM and its vTPM. Saved in ~/.config/docker-eqty/config. |
start | Starts the VM: starts the vTPM and, on vz, resets it, measures the launch and starts the relay. Checks Docker and guest notary readiness. |
stop | Stops the VM. |
status | running or stopped, with the flavour, VM, vTPM and Docker context. |
verify | Runs the flavour’s verification script: TPM checks from a container and, on vz, the launch measurements and IMA replay. |
settings [show [--json]] | Shows the effective VM settings. |
settings set Key=value ... | Changes settings for the next start. |
settings share add|remove DIR | Edits the shared directories. |
settings reset | Back to the defaults. |
run, create (also container run|create) | Passed to Docker with -e ENDPOINT=http://100.100.100.200:8066, the guest notary, added, and --device /dev/tpm* refused, so containers use the guest notary rather than the raw TPM. EQTY_ALLOW_TPM_DEVICE=1 allows the device. |
Defaults: flavour vz; VM vz-tpm for vz and the Colima profile tpm for qemu; vTPM
docker-vz or docker-tpm.
Environment
| Variable | Meaning |
|---|---|
EQTY_FLAVOUR | vz or qemu; overrides the saved flavour. |
EQTY_VM | The VM name, or Colima profile. |
EQTY_VTPM | The notary vTPM id. |
EQTY_ENDPOINT | The guest notary URL injected into run. Default http://100.100.100.200:8066. |
EQTY_ALLOW_TPM_DEVICE=1 | Let run pass /dev/tpm* to a container. |
Settings
Settings apply to the vz flavour and use Docker Desktop’s key names, so a settings.json from
Docker Desktop reads the same. They live in ~/.config/docker-eqty/settings.json and apply at
the next docker eqty start. The defaults match Docker Desktop’s.
| Key | Default | Effect |
|---|---|---|
Cpus | every core | vfkit --cpus; 1 to this Mac’s core count. |
MemoryMiB | half of the Mac’s memory | vfkit --memory; at least 1024, leaving macOS 1024. |
SwapMiB | 0 | A swap file on the Docker data disk, sized by the guest at each start. 0 removes it. |
DiskSizeMiB | 65536 | The Docker data disk’s logical size. Grows an existing disk at the next boot; never shrinks. |
FilesharingDirectories | /Users, /Volumes, /private | Directories shared with the guest over VirtioFS, read-write. Under /Users and /Volumes they mount at their own path; anything else under /host_mnt/<path>, with bind sources translated by the Docker API proxy, as Docker Desktop does. A bind source that does not exist on the Mac and lies in a Linux system directory such as /var/lib, /proc or /etc is left alone and means the VM’s path, so cAdvisor’s /var/lib/docker and node-exporter’s /proc work; /var/run/docker.sock always means the engine socket. A directory inside another share is covered by it. |
FilesharingImplementation | virtiofs | The only implementation; gRPC FUSE and osxfs are refused. |
UseRosetta | true when Rosetta is installed | vfkit attaches Apple’s Rosetta share; the guest registers it as the x86-64 ELF handler, so --platform linux/amd64 containers run. Install Rosetta with softwareupdate --install-rosetta --agree-to-license. |
VmBackend | vz | The plugin’s flavour, vz or qemu; setting it is docker eqty use. Docker VMM has no counterpart and is refused. |
SynchronizedFileShares | [] | Accepted with a warning, not implemented. |
docker eqty settings set Cpus=4 MemoryMiB=4096 SwapMiB=1024
docker eqty settings share add /Volumes/Data
docker eqty settings resetWhat the VZ flavour provides
With the vz flavour, docker eqty gives the usual Docker-on-Mac experience with these pieces
in place:
- A local Docker socket. A Mac proxy carries Docker API traffic over vsock to a small proxy
in the guest. The
vz-tpmDocker context points to it. Every API connection is a channel on one long-lived vsock stream with per-channel flow control: vfkit dials the guest once per vsock connection, and that dial stalls for good once a few dozen are in flight at the same time, as withdocker statsover many containers,export | importor paralleldocker run; one stream never trips it. A guest image from before the multiplexer still works, because the Mac proxy falls back to one connection per request when itsEQTY-MUX/1greeting goes unanswered. - Published ports. A Mac process follows the Docker events stream and mirrors published TCP
and UDP ports to the Mac the moment a container starts, including the ingress ports of swarm
services, which belong to no container. A port published on all addresses is relayed to the
VM’s address directly and is reachable from other machines on the Mac’s network, as with
Docker Desktop; publish as
127.0.0.1:8080:80to keep it local. A port already used by a Mac service is refused and logged once. host.docker.internalandgateway.docker.internalreach the Mac, for services that accept connections from the local network. A Mac service bound to127.0.0.1only is not reachable this way. macOS Local Network privacy applies: Apple-signed programs and GUI apps granted the permission accept the VM’s connections; a Homebrew CLI started from an SSH session does not.- Docker Desktop’s daemon defaults. At boot the guest writes
"log-driver": "local"intodaemon.json, since the json-file driver halves a container’s stdout throughput to the Mac and grows without bound, and"default-stop-timeout": 3when its dockerd knows the key. For an engine that does not, the Mac proxy putsStopTimeout: 3on every container that sets none, sodocker stopandcompose downkill a SIGTERM-ignoring container after 3 seconds as Docker Desktop does, not after the engine’s 10. A composestop_grace_periodor--stop-timeoutstill wins. - inotify for Mac edits. VirtioFS shows the guest a changed file but emits no inotify event for it. A Mac process watches the shared directories with FSEvents and tells the guest which paths changed; the guest re-applies each file’s timestamps, which inotify reports as a change, so hot-reload tools work. Nothing is written to the Mac.
- An egress check at start. The guest connects to a public resolver over IPv4 and IPv6 and
resolves a name, and
startwarns when IPv4 or DNS fails. A vmnet fault that leaves only IPv6 looks like slow builds otherwise; stop and start the VM. - The notary address stays local. The guest pins
100.100.100.200to its loopback, so theENDPOINTcontainers are given always resolves to the guest notary.
How the two flavours compare with Docker Desktop is in the appendix.
Files
| Path | What |
|---|---|
/opt/eqty/docker/ | The plugin, both flavours’ scripts, the VZ guest kernel with its BUILDINFO, the compressed guest image. Read-only. |
~/.config/docker-eqty/ | config (flavour, VM, vTPM) and settings.json. |
~/.local/share/eqty-vz-tpm/<vm>/ | The VZ VM: disk.raw (system), docker-eqty.raw (Docker data), the Docker socket, logs. Unpacked on first start. |
~/.local/share/eqty-docker/ | Build output and results for the installed scripts. |
sudo /opt/eqty/docker/uninstall.sh | Removes the package. VM disks, Docker data, vTPMs and per-user settings stay in place. |
An update stops running VZ VMs first and leaves existing per-user disks alone; only a missing system disk is unpacked from the bundled image.