Skip to content

Examples

Copy/paste fragments for your own base image and setup scripts. They are not DVM runtime code, and DVM does not maintain their versions or checksums: pin them yourself and update when you bump. Review and adapt before use.

In v3 there are two homes for these snippets:

  • Base image (~/.config/dvm/base/Containerfile): shared tooling baked once for every VM. These are Dockerfile RUN/ARG lines that run at build time as root. Start the file FROM dvm-base and build with dvm base build. See the base image reference.
  • Per-VM (~/.config/dvm/vms/<vm>/setup.sh): VM-specific, stateful steps (keys, dotfiles, tunnels). These run during dvm sync as the Lima login user with sudo, with set -Eeuo pipefail prepended and the DVM_* variables exported (see the config reference). Run a command as the dev user with sudo -u "$DVM_USER" -H ....

dvm-base already installs zsh and the rootless-container dependencies, and provides compressed swap (zram), the rootless-docker user service, and a binfmt mask, so you do not need snippets for those. All examples assume the Fedora guest with dnf5.

TopicWhat it covers
PackagesFedora and Copr packages
Verified binary downloadUpstream binaries not in dnf
AI CLIsClaude Code and Codex CLIs
Rootless DockerEngine install on top of dvm-base
Rootless PodmanRootless Podman
TopicWhat it covers
SSH keysVM-local SSH keys, private repos
GPG signing keyVM-local GPG signing key
Dotfileschezmoi dotfiles
Cloudflare TunnelCloudflare Tunnel
TailscaleTailscale
Default shellOverride the default shell
Rootful DockerRootful Docker (guest-root risk)
One user per projectOne VM, one user per project

Built and maintained by eshlox.