Example: Ephemeral dev environment
You use this pattern when you want a clean Linux workspace for a short task: try a package, run a formatter, compile a snippet, or reproduce a bug. You create a sandbox with a system image (code or max: see System images), you run exec with cwd and env, you throw the VM away when you finish.
What you accomplish
You get a VM from the VoidRun catalog. Thecode image includes Python and Node on a thin Alpine base (fast startup). The max image is Debian-based when you need broader apt compatibility. You install extra tools inside the VM. You never pollute your local machine with one-off global installs.
Concepts you use
image: You setcode,max, ordocker(only when you need Docker in-VM). You list entries withGET /imageswhen you are unsure.envVars/env_vars: You injectPIP_,NODE_, or project variables so installs behave predictably.execoptions: You combinecommand,cwd,timeout, andenvper step.
Prerequisites
You completed Examples overview.Step 1: Create a workspace on the code image
Step 2: Python tooling (venv + pip)
You create a folder, you usepython3, you install packages into a venv when you want isolation.
On Alpine-based images,
source may not exist; use . /path/to/activate (POSIX dot) as above. If a command fails, switch to max for a Debian-style shell or install bash in the VM.Step 3: Node tooling on the same code image
You do not change the image: code already includes Node. You run npm or npx in /work.
Step 4: Optional: Debian-style box with max
You choose max when you prefer Debian and typical apt / bash workflows over the code image.
Step 5: Remove the sandbox
Practices you should follow
- You pick memory large enough for
npm cior heavy wheels; you raisememif installs OOM. - You keep secrets out of shell history; prefer
envfor tokens. - You read Package management for
apt,pip, andnpmpatterns.
Related guides
System images
code, max, docker
Multi-step job
Chain commands in one sandbox

